code: def run_and_exit_if(opts, action, *names):
      
      for name in names:
          if name in opts:
              action()
              sys.exit(0)
docs: Run the no-arg function `action` if any of `names` appears in the
      option dict `opts`.