code: def merkle_pair(hashes, hash_f):
      
      if len(hashes) % 2 == 1:
          hashes = list(hashes)
          hashes.append(hashes[-1])
      items = []
      for i in range(0, len(hashes), 2):
          items.append(hash_f(hashes[i] + hashes[i+1]))
      return items
docs: Take a list of hashes, and return the parent row in the tree of merkle hashes.