code: def _fit(
      self,
      idx: int,
      line: np.ndarray,
      is_label: bool,
      custom_types: Optional[Dict[str, ColumnTypes]],
  ) -> None:
      str_idx = str(idx)
      file_parser = self.file_parser
      if file_parser is None or file_parser.is_placeholder:
          int_line = line.astype(int).astype(np.float64)
          dtype = (
              DataTypes.INT
              if np.allclose(line, int_line)
              else DataTypes.FLOAT
          )
          key = name = str_idx
      else:
          attr = f"{'label' if is_label else 'feature'}_header"
          header = getattr(file_parser, attr)
          dtype = file_parser.converters[header[idx]].dtype
          key = header[idx]
          name = f"'{key}'"
      custom_type = (
          None if custom_types is None else custom_types.get(key)
      )
      column_type, num_unique = self._fit_with(
          name, line, dtype, custom_type
      )
      (self.label_types if is_label else self.feature_types)[
          str_idx
      ] = column_type
      if column_type != ColumnTypes.NUMERICAL:
          uniques = (
              self.num_unique_labels
              if is_label
              else self.num_unique_features
          )
          uniques[str_idx] = num_unique
  
imports: import numpy
  from typing import Any
  from typing import Dict
  from typing import Tuple
  from typing import Optional
  from dataclasses import dataclass
  from cftool.misc import print_warning
  from .file import FileParserBlock
  from ....schema import DataTypes
  from ....schema import DataBundle
  from ....schema import ColumnTypes
  from ....schema import INoInitDataBlock
label_desc: Use image node_id 5 for calling the RecognizerBlock obj's underlying member method code with example usage: obj._fit(idx, line, is_label, custom_types) without return types