class_docstr: Extension of argparse.ArgumentParser supporting config files.
  
  The option --config is added automatically and expects a YAML serialized
  dictionary, similar to the return value of parse_args(). Command line
  parameters have precedence over config file values. Usage should be
  transparent, just substitute argparse.ArgumentParser with this class.
  
  Extended from
  https://stackoverflow.com/questions/28579661/getting-required-option-from-namespace-in-python
class_docstr_tok: ["Extension","of","argparse.ArgumentParser","supporting","config","files",".","The","option","--","config","is","added","automatically","and","expects","a","YAML","serialized","dictionary",",","similar","to","the","return","value","of","parse_args","(",")",".","Command","line","parameters","have","precedence","over","config","file","values",".","Usage","should","be","transparent",",","just","substitute","argparse.ArgumentParser","with","this","class",".","Extended","from","https",":","\/\/stackoverflow.com\/questions\/28579661\/getting-required-option-from-namespace-in-python"]
code: def parse_args(self, args=None, namespace=None) -> argparse.Namespace:  # type: ignore
      # Mini argument parser to find the config file
      config_parser = argparse.ArgumentParser(add_help=False)
      config_parser.add_argument("--config", type=regular_file())
      config_args, _ = config_parser.parse_known_args(args=args)
      initial_args = argparse.Namespace()
      if config_args.config:
          initial_args = load_args(config_args.config)
          # Remove the 'required' flag from options loaded from config file
          for action in self.argument_actions:
              if action.dest in initial_args:
                  action.required = False
      return super().parse_args(args=args, namespace=initial_args)
  
imports: import argparse
  import os
  import sys
  import types
  from typing import Any, Callable, Dict, List, Tuple, Optional
  import yaml
  from sockeye.utils import smart_open
  from .None import constants
label_desc: Use image node_id 5 for calling the ConfigArgumentParser obj's underlying member method code with example usage: obj.parse_args(args, namespace) and returns: super