Implement to_float_tensor(values) that converts a Python list (or list of lists) of numbers into a torch.float32 tensor.
The function should preserve the nesting structure of the input: a flat list becomes a 1-D tensor, and a list of lists becomes a 2-D tensor. The dtype must always be torch.float32, even when the input contains Python int values.
dtype argument to that constructor.