class_docstr: The base class for binary operations of pandas-on-Spark objects (of different data types).
class_docstr_tok: ["The","base","class","for","binary","operations","of","pandas-on-Spark","objects","(","of","different","data","types",")","."]
code: def __new__(cls, dtype: Dtype, spark_type: DataType) -> "DataTypeOps":
      from pyspark.pandas.data_type_ops.binary_ops import BinaryOps
      from pyspark.pandas.data_type_ops.boolean_ops import (
          BooleanOps,
          BooleanExtensionOps,
      )
      from pyspark.pandas.data_type_ops.categorical_ops import (
          CategoricalOps,
      )
      from pyspark.pandas.data_type_ops.complex_ops import (
          ArrayOps,
          MapOps,
          StructOps,
      )
      from pyspark.pandas.data_type_ops.date_ops import DateOps
      from pyspark.pandas.data_type_ops.datetime_ops import (
          DatetimeOps,
          DatetimeNTZOps,
      )
      from pyspark.pandas.data_type_ops.null_ops import NullOps
      from pyspark.pandas.data_type_ops.num_ops import (
          DecimalOps,
          FractionalExtensionOps,
          FractionalOps,
          IntegralExtensionOps,
          IntegralOps,
      )
      from pyspark.pandas.data_type_ops.string_ops import (
          StringOps,
          StringExtensionOps,
      )
      from pyspark.pandas.data_type_ops.timedelta_ops import (
          TimedeltaOps,
      )
      from pyspark.pandas.data_type_ops.udt_ops import UDTOps
  
      if isinstance(dtype, CategoricalDtype):
          return object.__new__(CategoricalOps)
      elif isinstance(spark_type, DecimalType):
          return object.__new__(DecimalOps)
      elif isinstance(spark_type, FractionalType):
          if extension_float_dtypes_available and type(dtype) in [
              Float32Dtype,
              Float64Dtype,
          ]:
              return object.__new__(FractionalExtensionOps)
          else:
              return object.__new__(FractionalOps)
      elif isinstance(spark_type, IntegralType):
          if extension_dtypes_available and type(dtype) in [
              Int8Dtype,
              Int16Dtype,
              Int32Dtype,
              Int64Dtype,
          ]:
              return object.__new__(IntegralExtensionOps)
          else:
              return object.__new__(IntegralOps)
      elif isinstance(spark_type, StringType):
          if extension_object_dtypes_available and isinstance(
              dtype, StringDtype
          ):
              return object.__new__(StringExtensionOps)
          else:
              return object.__new__(StringOps)
      elif isinstance(spark_type, BooleanType):
          if extension_object_dtypes_available and isinstance(
              dtype, BooleanDtype
          ):
              return object.__new__(BooleanExtensionOps)
          else:
              return object.__new__(BooleanOps)
      elif isinstance(spark_type, TimestampType):
          return object.__new__(DatetimeOps)
      elif isinstance(spark_type, TimestampNTZType):
          return object.__new__(DatetimeNTZOps)
      elif isinstance(spark_type, DateType):
          return object.__new__(DateOps)
      elif isinstance(spark_type, DayTimeIntervalType):
          return object.__new__(TimedeltaOps)
      elif isinstance(spark_type, BinaryType):
          return object.__new__(BinaryOps)
      elif isinstance(spark_type, ArrayType):
          return object.__new__(ArrayOps)
      elif isinstance(spark_type, MapType):
          return object.__new__(MapOps)
      elif isinstance(spark_type, StructType):
          return object.__new__(StructOps)
      elif isinstance(spark_type, NullType):
          return object.__new__(NullOps)
      elif isinstance(spark_type, UserDefinedType):
          return object.__new__(UDTOps)
      else:
          raise TypeError("Type %s was not understood." % dtype)
  
imports: import numbers
  from abc import ABCMeta
  from typing import Any, Optional, Union
  from itertools import chain
  import numpy
  import pandas
  from pandas.api.types import CategoricalDtype
  from pyspark.sql import functions
  from pyspark.sql.types import ArrayType, BinaryType, BooleanType, DataType, DateType, DayTimeIntervalType, DecimalType, FractionalType, IntegralType, MapType, NullType, NumericType, StringType, StructType, TimestampType, TimestampNTZType, UserDefinedType
  from pyspark.pandas._typing import Dtype, IndexOpsLike, SeriesOrIndex
  from pyspark.pandas.typedef import extension_dtypes
  from pyspark.pandas.typedef.typehints import extension_dtypes_available, extension_float_dtypes_available, extension_object_dtypes_available, spark_type_to_pandas_dtype
  from pyspark.sql.utils import get_column_class
label_desc: Use image node_id 1 for calling the DataTypeOps obj's underlying member method code with example usage: obj.__new__(cls, dtype, spark_type) and returns: object, object, object, object, object, object, object, object, object, object, object, object, object, object, object, object, object, object, object, object