code: def parse_args(add_args, docstring):
      
  
      def run_args():
          """Run any global methods eponymous with args"""
          valuable_args = {k for k, v in args.__dict__.items() if v}
          arg_methods = {globals()[a] for a in valuable_args if a in globals()}
          if not arg_methods:
              return
          for method in arg_methods:
              method()
          raise SystemExit(_exit_ok)
  
      parser = argparse.ArgumentParser(
          description=docstring and docstring.splitlines()[0] or "No docstring")
      result = add_args(parser)
      parser = result if result else parser
      parser.add_argument('-v', '--version', action='store_true',
                          help='Show version [default: %s]' % __version__)
      # parser.add_argument('-q', '--quiet', action='store_true',
      # help='Do not show stdout')
      # parser.add_argument('-Q', '--quiet_errors', action='store_true',
      # help='Do not show stderr')
      global args  # pylint: disable=global-statement
      args = parser.parse_args()
      run_args()
      return args
docs: Parse out command line arguments