title: Python Argparse conditionally required arguments
body: <p>I have done as much research as possible but I haven't found the best way to make certain cmdline arguments necessary only under certain conditions, in this case only if other arguments have been given. Here's what I want to do at a very basic level:</p>
  
  <pre><code>p = argparse.ArgumentParser(description='...')
  p.add_argument('--argument', required=False)
  p.add_argument('-a', required=False) # only required if --argument is given
  p.add_argument('-b', required=False) # only required if --argument is given
  </code></pre>
  
  <p>From what I have seen, other people seem to just add their own check at the end:</p>
  
  <pre><code>if args.argument and (args.a is None or args.b is None):
      # raise argparse error here
  </code></pre>
  
  <p>Is there a way to do this natively within the argparse package?</p>