code: def build_code(self, _data):
      imputer_type = self.cfg["type"]
      code = []
      if imputer_type == "iterative":
          code.append(
              (
                  "from sklearn.experimental import enable_iterative_imputer\n"
                  "from sklearn.impute import IterativeImputer\n\n"
                  "output = IterativeImputer().fit_transform(df[['{col}']])"
              ).format(col=self.col)
          )
      elif imputer_type == "knn":
          n_neighbors = self.cfg.get("n_neighbors") or 2
          code.append(
              (
                  "from sklearn.impute import KNNImputer\n\n"
                  "output = KNNImputer(n_neighbors={n_neighbors}).fit_transform(df[['{col}']])"
              ).format(col=self.col, n_neighbors=n_neighbors)
          )
      elif imputer_type == "simple":
          code.append(
              (
                  "from sklearn.impute import SimpleImputer\n\n"
                  "output = SimpleImputer().fit_transform(df[['{col}']])"
              ).format(col=self.col)
          )
      code.append(
          "df.loc[:, '{name}'] = pd.DataFrame(output, columns=['{col}'], index=df.index)['{col}']".format(
              name=self.name or self.col, col=self.col
          )
      )
      return "\n".join(code)
  
imports: import re
  import numpy
  import pandas
  from six import string_types
  import dtale.global_state
  from dtale.column_builders import ReplaceColumnBuilder
  from dtale.utils import classify_type, find_dtype, dict_merge
label_desc: Use image node_id 3 for calling the ImputerReplacement obj's underlying member method code with example usage: obj.build_code(_data) and returns: str