code: def _tensor_size(tensor):
      """Returns the size of an input tensor"""
      tensor_type = tensor.type.tensor_type
      size = None
      dim_values = [
          dim.dim_value
          for dim in tensor_type.shape.dim
          if dim.dim_value is not None and dim.dim_value > 0
      ]
      if len(dim_values) == 1:
          size = dim_values[0]
      elif dim_values == []:
          raise ValueError(
              f"Tensor {tensor} has no positive dimensions."
          )
      else:
          raise ValueError(
              f"Tensor {tensor} has multiple positive dimensions."
          )
      return size
  
file_path: OMLT/src/omlt/gbt/model.py
label_desc: Use image node_id 3 for calling a global function with example usage: _tensor_size(tensor) and returns: size