This function corresponds to terraform.NewInterpolatedVariable, but built with HCL2 primitives. It accepts a hcl.Traversal, which is what is returned from the HCL2 API functions to find which variables are referenced in a given expression.