code: def astensorproduct(array: TensorLike) -> BKTensor:
      
      tensor = astensor(array)
      N = int(math.log2(size(tensor)))
      array = tensor.reshape([2]*N)
      return array
docs: Converts a numpy array to the backend's tensor object, and reshapes
      to [2]*N (So the number of elements must be a power of 2)