code: def register_subparser(
      parsers: argparse._SubParsersAction,
  ) -> None:  # pylint: disable=protected-access
      """Add subparser for `new` command."""
      new_parser = parsers.add_parser(
          "new",
          help="Creates a new dataset directory from the template.",
      )
      new_parser.add_argument(
          "dataset_name",  # Positional argument
          type=str,
          help="Name of the dataset to be created (in snake_case)",
      )
      new_parser.add_argument(
          "--data_format",  # Optional argument
          type=str,
          default=builder_templates.STANDARD,
          choices=[
              builder_templates.STANDARD,
              builder_templates.CONLL,
              builder_templates.CONLLU,
          ],
          help=(
              "Optional format of the input data, which is used to generate a "
              "format-specific template."
          ),
      )
      new_parser.add_argument(
          "--dir",
          type=pathlib.Path,
          default=pathlib.Path.cwd(),
          help=(
              "Path where the dataset directory will be created. "
              "Defaults to current directory."
          ),
      )
      new_parser.set_defaults(subparser_fn=_create_dataset_files)
  
imports: import argparse
  import os
  import pathlib
  import subprocess
  import textwrap
  from typing import Optional
  from tensorflow_datasets.core import constants
  from tensorflow_datasets.core import dataset_metadata
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core.utils import resource_utils
  from tensorflow_datasets.scripts.cli import builder_templates
  from tensorflow_datasets.scripts.cli import cli_utils
label_desc: Use image node_id 1 for calling a global function with example usage: register_subparser(parsers) without return types