code: def fit(self, X, y=None):
      # Check parameters
      if not isinstance(X, self._types):
          return super(SimpleImputer, self).fit(X, y=y)
  
      if hasattr(self, "add_indicator"):
          # scikit-learn version has add_indicator
          if self.add_indicator:
              msg = (
                  "dask-ml does not currently implement add_indicator"
                  ""
              )
              raise NotImplementedError(msg)
          self.indicator_ = None
  
      allowed_strategies = [
          "mean",
          "median",
          "most_frequent",
          "constant",
      ]
      if self.strategy not in allowed_strategies:
          raise ValueError(
              "Can only use these strategies: {0} "
              " got strategy={1}".format(
                  allowed_strategies, self.strategy
              )
          )
  
      if not (
          pd.isna(self.missing_values) or self.strategy == "constant"
      ):
          raise ValueError(
              "dask_ml.preprocessing.Imputer only supports non-NA values for "
              "'missing_values' when 'strategy=constant'."
          )
  
      X = self._check_array(X)
  
      if isinstance(X, da.Array):
          self._fit_array(X)
      else:
          self._fit_frame(X)
      self.n_features_in_ = X.shape[1]
      return self
  
file_path: dask-ml/dask_ml/impute.py
imports: import dask
  import dask.array
  import dask.dataframe
  import numpy
  import pandas
  import sklearn.impute
  from .utils import check_array
label_desc: Use image node_id 2 for calling the SimpleImputer obj's underlying member method code with example usage: obj.fit(X, y) and returns: self, super