class_docstr: This subclass of `argparse.ArgumentParser` uses type hints on dataclasses to generate arguments.
  
  The class is designed to play well with the native argparse. In particular, you can add more (non-dataclass backed)
  arguments to the parser after initialization and you'll get the output back after parsing as an additional
  namespace.
class_docstr_tok: ["This","subclass","of","`","argparse.ArgumentParser","`","uses","type","hints","on","dataclasses","to","generate","arguments",".","The","class","is","designed","to","play","well","with","the","native","argparse",".","In","particular",",","you","can","add","more","(","non-dataclass","backed",")","arguments","to","the","parser","after","initialization","and","you","'ll","get","the","output","back","after","parsing","as","an","additional","namespace","."]
docstr: Args:
      dataclass_types:
          Dataclass type, or list of dataclass types for which we will "fill" instances with the parsed args.
      kwargs:
          (Optional) Passed to `argparse.ArgumentParser()` in the regular way.
docstr_tok: ["Args",":","dataclass_types",":","Dataclass","type",",","or","list","of","dataclass","types","for","which","we","will","``","fill","''","instances","with","the","parsed","args",".","kwargs",":","(","Optional",")","Passed","to","`","argparse.ArgumentParser","(",")","`","in","the","regular","way","."]
code: def __init__(
      self,
      dataclass_types: Union[DataClassType, Iterable[DataClassType]],
      **kwargs,
  ):
      """
      Args:
          dataclass_types:
              Dataclass type, or list of dataclass types for which we will "fill" instances with the parsed args.
          kwargs:
              (Optional) Passed to `argparse.ArgumentParser()` in the regular way.
      """
      super().__init__(**kwargs)
      if dataclasses.is_dataclass(dataclass_types):
          dataclass_types = [dataclass_types]
      self.dataclass_types = dataclass_types
      for dtype in self.dataclass_types:
          self._add_dataclass_arguments(dtype)
  
file_path: FATE/python/fate/arch/launchers/argparser.py
imports: import dataclasses
  import json
  import sys
  from argparse import ArgumentParser
  from enum import Enum
  from pathlib import Path
  from typing import Any, Iterable, List, NewType, Optional, Tuple, Union
label_desc: Use image node_id 1 to create a new HfArgumentParser object from inherited base classes: ArgumentParser with example: obj = HfArgumentParser(dataclass_types)