code: def parse(self, argv):
          
          rv = {}
          for pattern in self.patterns:
              pattern.apply(rv, argv)
          return rv
docs: Parses the given `argv` and returns a dictionary mapping argument names
          to the values found in `argv`.