class_docstr: Base class for dataset config generator.
  
  Args:
      data_root (str): The root path of the dataset.
      task (str): The task of the dataset.
      dataset_name (str): The name of the dataset.
      overwrite_cfg (bool): Whether to overwrite the dataset config file if
          it already exists. If False, config generator will not generate new
          config for datasets whose configs are already in base.
      train_anns (List[Dict], optional): A list of train annotation files
          to appear in the base configs. Defaults to None.
          Each element is typically a dict with the following fields:
          - ann_file (str): The path to the annotation file relative to
            data_root.
          - dataset_postfix (str, optional): Affects the postfix of the
            resulting variable in the generated config. If specified, the
            dataset variable will be named in the form of
            ``{dataset_name}_{dataset_postfix}_{task}_{split}``. Defaults to
            None.
      val_anns (List[Dict], optional): A list of val annotation files
          to appear in the base configs, similar to ``train_anns``. Defaults
          to None.
      test_anns (List[Dict], optional): A list of test annotation files
          to appear in the base configs, similar to ``train_anns``. Defaults
          to None.
      config_path (str): Path to the configs. Defaults to 'configs/'.
docstr: Generates the base dataset config.
code: def __call__(self) -> None:
      """Generates the base dataset config."""
  
      dataset_config = self._gen_dataset_config()
  
      cfg_path = osp.join(
          self.config_path,
          self.task,
          "_base_",
          "datasets",
          f"{self.dataset_name}.py",
      )
      if osp.exists(cfg_path) and not self.overwrite_cfg:
          print(f"{cfg_path} found, skipping.")
          return
      mkdir_or_exist(osp.dirname(cfg_path))
      with open(cfg_path, "w") as f:
          f.write(
              f"{self.dataset_name}_{self.task}_data_root = '{self.data_root}'\n"  # noqa: E501
          )
          f.write(dataset_config)
  
file_path: mmocr/mmocr/datasets/preparers/config_generators/base.py
imports: import os.path
  from abc import abstractmethod
  from typing import Dict, List, Optional
  from mmengine import mkdir_or_exist
label_desc: Use image node_id 3 for calling the BaseDatasetConfigGenerator obj's underlying member method code with example usage: obj.__call__() without return types