class_docstr: Convert from Numpy array to PyTorch Tensor.
code: def generate_code(self) -> Callable:
      def to_tensor(inp, dst):
          return ch.from_numpy(inp)
  
      return to_tensor
  
imports: import torch
  import numpy
  from typing import Callable, Optional, Tuple
  from ..pipeline.allocation_query import AllocationQuery
  from ..pipeline.operation import Operation
  from ..pipeline.state import State
  from dataclasses import replace
label_desc: Use image node_id 2 for calling the ToTensor obj's underlying member method code with example usage: obj.generate_code() and returns: to_tensor, ch