code: def _consume_flags(self):
      
      flags = []
      while self._at_flag():
        flag = self._unconsumed_args.pop()
        if not self._check_for_help_request(flag):
          flags.append(flag)
      return flags
docs: Read flags until we encounter the first token that isn't a flag.