code: def __call__(self, x):
      if isinstance(x, pd.Series):
          x = asseries(x)
      elif not isinstance(x, ENTITY_TYPE):
          x = astensor(x)
      if x.ndim != 1:
          raise ValueError("Input array must be 1 dimensional")
      if x.size == 0:
          raise ValueError("Cannot cut empty array")
  
      inputs = [x]
      if self._labels is not None and not isinstance(
          self._labels, (bool, ENTITY_TYPE)
      ):
          self._labels = np.asarray(self._labels)
  
      # infer dtype
      x_empty = (
          pd.Series([1], dtype=x.dtype)
          if isinstance(x, SERIES_TYPE)
          else np.asarray([1], dtype=x.dtype)
      )
      if isinstance(self._bins, INDEX_TYPE):
          bins = self._bins.index_value.to_pandas()
          inputs.append(self._bins)
          bins_unknown = True
      elif isinstance(self._bins, ENTITY_TYPE):
          bins = np.asarray([2], dtype=self._bins.dtype)
          inputs.append(self._bins)
          bins_unknown = True
      else:
          bins = self._bins
          bins_unknown = isinstance(self._bins, Integral)
      if isinstance(self._labels, ENTITY_TYPE):
          bins_unknown = True
          labels = None
          inputs.append(self._labels)
      else:
          if self._labels is False or not bins_unknown:
              labels = self._labels
          else:
              labels = None
      ret = pd.cut(
          x_empty,
          bins,
          right=self._right,
          labels=labels,
          retbins=True,
          include_lowest=self._include_lowest,
          duplicates=self._duplicates,
      )
  
      kws = []
      output_types = []
      if bins_unknown and isinstance(ret[0].dtype, pd.CategoricalDtype):
          # inaccurate dtype, just create an empty one
          out_dtype = pd.CategoricalDtype()
      else:
          out_dtype = ret[0].dtype
      if isinstance(ret[0], pd.Series):
          output_types.append(OutputType.series)
          kws.append(
              {
                  "dtype": out_dtype,
                  "shape": x.shape,
                  "index_value": x.index_value,
                  "name": x.name,
              }
          )
      elif isinstance(ret[0], np.ndarray):
          output_types.append(OutputType.tensor)
          kws.append(
              {
                  "dtype": out_dtype,
                  "shape": x.shape,
                  "order": TensorOrder.C_ORDER,
              }
          )
      else:
          assert isinstance(ret[0], pd.Categorical)
          output_types.append(OutputType.categorical)
          kws.append(
              {
                  "dtype": out_dtype,
                  "shape": x.shape,
                  "categories_value": parse_index(
                      out_dtype.categories, store_data=True
                  ),
              }
          )
  
      if self._retbins:
          if isinstance(self._bins, (pd.IntervalIndex, INDEX_TYPE)):
              output_types.append(OutputType.index)
              kws.append(
                  {
                      "dtype": self._bins.dtype,
                      "shape": self._bins.shape,
                      "index_value": self._bins.index_value
                      if isinstance(self._bins, INDEX_TYPE)
                      else parse_index(self._bins, store_data=False),
                      "name": self._bins.name,
                  }
              )
          else:
              output_types.append(OutputType.tensor)
              kws.append(
                  {
                      "dtype": ret[1].dtype,
                      "shape": ret[1].shape
                      if ret[1].size > 0
                      else (np.nan,),
                      "order": TensorOrder.C_ORDER,
                  }
              )
  
      self.output_types = output_types
      return ExecutableTuple(self.new_tileables(inputs, kws=kws))
  
imports: from functools import partial
  from numbers import Integral
  import numpy
  import pandas
  from ...None import opcodes
  from ...core import ENTITY_TYPE, ExecutableTuple, OutputType, recursive_tile
  from ...core.context import get_context
  from ...lib.version import parse
  from ...serialization.serializables import KeyField, AnyField, BoolField, Int32Field, StringField
  from ...tensor import tensor
  from ...tensor.core import TENSOR_TYPE, TensorOrder
  from ...utils import has_unknown_shape
  from ..core import SERIES_TYPE, INDEX_TYPE
  from ..datasource.index import from_pandas
  from ..initializer import Series
  from ..operands import DataFrameOperand, DataFrameOperandMixin
  from ..utils import parse_index
label_desc: Use image node_id 13 for calling the DataFrameCut obj's underlying member method code with example usage: obj.__call__(x) and returns: ExecutableTuple