docs: def extract_keypairs(lines, regexer):
      """Given some lines of text, extract key-value pairs from them"""
      updates = {}
      for line in lines:
          # for consistency we must match the replacer and strip whitespace / newlines
          match = regexer.match(line.strip())
          if not match:
              continue
          k_v = match.groupdict()
          updates[k_v[Constants.KEY_GROUP]] = k_v[Constants.VALUE_GROUP]
      return updates