code: def __init__(self, array):
      self.shape = array.shape
      self.strides = _byte2step(array.strides, array.itemsize)
      if isinstance(array, np.ndarray):
          base_array = _get_base_array(array)
          array_ptr = array.__array_interface__["data"][0]
          base_array_ptr = base_array.__array_interface__["data"][0]
          offset_bytes = array_ptr - base_array_ptr
      elif isinstance(array, cuda.ndarray):
          offset_bytes = array.data.ptr - array.data.mem.ptr
      else:
          raise ValueError("only (np|cp).ndarray is supported")
      (self.storage_offset,) = _byte2step(
          (offset_bytes,), array.itemsize
      )
      self.itemsize = array.itemsize
  
imports: import numpy
  import six
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function_node
  from chainer.utils import type_check
label_desc: Use image node_id 1 to create a new TensorGeometry object from inherited base classes: object with example: obj = TensorGeometry(array)