code: def __init__(
      self, values, dtype=None, copy=False, context=None
  ) -> None:
      for i, val in enumerate(values):
          if is_float(val) or is_integer(val):
              if np.isnan(val):
                  values[i] = DecimalDtype.na_value
              else:
                  # error: Argument 1 has incompatible type "float | int |
                  # integer[Any]"; expected "Decimal | float | str | tuple[int,
                  # Sequence[int], int]"
                  values[i] = DecimalDtype.type(val)  # type: ignore[arg-type]
          elif not isinstance(val, decimal.Decimal):
              raise TypeError(
                  "All values must be of type " + str(decimal.Decimal)
              )
      values = np.asarray(values, dtype=object)
  
      self._data = values
      # Some aliases for common attribute names to ensure pandas supports
      # these
      self._items = self.data = self._data
      # those aliases are currently not working due to assumptions
      # in internal code (GH-20735)
      # self._values = self.values = self.data
      self._dtype = DecimalDtype(context)
  
imports: from __future__ import annotations
  import decimal
  import numbers
  import sys
  from typing import TYPE_CHECKING
  import numpy
  from pandas.core.dtypes.base import ExtensionDtype
  from pandas.core.dtypes.common import is_dtype_equal, is_float, is_integer, pandas_dtype
  import pandas
  from pandas.api.extensions import no_default, register_extension_dtype
  from pandas.api.types import is_list_like, is_scalar
  from pandas.core import arraylike
  from pandas.core.algorithms import value_counts_internal
  from pandas.core.arraylike import OpsMixin
  from pandas.core.arrays import ExtensionArray, ExtensionScalarOpsMixin
  from pandas.core.indexers import check_array_indexer
label_desc: Use image node_id 1 to create a new DecimalArray object from inherited base classes: OpsMixin, ExtensionScalarOpsMixin, ExtensionArray with example: obj = DecimalArray(values, dtype, copy, context)