class_docstr: Helper class to manage the options for variable objects and its configuration.
  
  Example:
  
  >>> class A:
  ...     def __init__(self, foo=3):  pass
  >>> class B:
  ...     def __init__(self, bar="aaaa"):  pass
  >>> choices = ClassChoices("var", dict(a=A, b=B), default="a")
  >>> import argparse
  >>> parser = argparse.ArgumentParser()
  >>> choices.add_arguments(parser)
  >>> args = parser.parse_args(["--var", "a", "--var_conf", "foo=4")
  >>> args.var
  a
  >>> args.var_conf
  {"foo": 4}
  >>> class_obj = choices.get_class(args.var)
  >>> a_object = class_obj(**args.var_conf)
code: def add_arguments(self, parser):
      parser.add_argument(
          f"--{self.name}",
          type=lambda x: str_or_none(x.lower()),
          default=self.default,
          choices=self.choices(),
          help=f"The {self.name} type",
      )
      parser.add_argument(
          f"--{self.name}_conf",
          action=NestedDictAction,
          default=dict(),
          help=f"The keyword arguments for {self.name}",
      )
  
file_path: espnet/espnet2/train/class_choices.py
imports: from typing import Mapping, Optional, Tuple
  from typeguard import check_argument_types, check_return_type
  from espnet2.utils.nested_dict_action import NestedDictAction
  from espnet2.utils.types import str_or_none
label_desc: Use image node_id 4 for calling the ClassChoices obj's underlying member method code with example usage: obj.add_arguments(parser) without return types