def METHOD_NAME(self) -> str:
    """Generate a full dataset config based on the annotation file
    dictionary.
    Args:
        ann_dict (dict[str, dict(str, str)]): A nested dictionary that maps
            a config variable name (such as icdar2015_textrecog_train) to
            its corresponding annotation information dict. Each dict
            contains following keys:
            - 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.
            - split (str): The split the annotation belongs to. Usually
              it can be 'train', 'val' and 'test'.
    Returns:
        str: The generated dataset config.
    """
    cfg = ''
    for key_name, ann_dict in self.anns.items():
        cfg += f'\n{key_name} = dict(\n'
        cfg += '    type=\'OCRDataset\',\n'
        cfg += '    data_root=' + f'{self.dataset_name}_{self.task}_data_root,\n'  # noqa: E501
        cfg += f'    ann_file=\'{ann_dict["ann_file"]}\',\n'
        if ann_dict['split'] == 'train':
            cfg += '    filter_cfg=dict(filter_empty_gt=True, min_size=32),\n'  # noqa: E501
        elif ann_dict['split'] in ['test', 'val']:
            cfg += '    test_mode=True,\n'
        cfg += '    pipeline=None)\n'
    return cfg