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 _overwrite_add_argument(self, original_object):
      def _new_add_argument(this_self, *args, **kwargs):
          action = this_self.original_add_argument(*args, **kwargs)
          this_self.config_container._register_argument(
              action, *args, **kwargs
          )
  
      original_object.original_add_argument = (
          original_object.add_argument
      )
      original_object.config_container = self
      original_object.add_argument = types.MethodType(
          _new_add_argument, original_object
      )
  
      return original_object
  
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 3 for calling the ConfigArgumentParser obj's underlying member method code with example usage: obj._overwrite_add_argument(original_object) and returns: original_object