code: def calculate_merkle_root(hashes, hash_function=bin_double_sha256,
                            hex_format=True):
      
      if hex_format:
          hashes = hex_to_bin_reversed_hashes(hashes)
      # keep moving up the merkle tree, constructing one row at a time
      while len(hashes) > 1:
          hashes = calculate_merkle_pairs(hashes, hash_function)
      # get the merkle root
      merkle_root = hashes[0]
      # if the user wants the merkle root in hex format, convert it
      if hex_format:
          return bin_to_hex_reversed(merkle_root)
      # return the binary merkle root
      return merkle_root
docs: takes in a list of binary hashes, returns a binary hash