code: def calculate_hashes(self):
          
          hashers = []
          if not self.mardata.signatures:
              return []
  
          for s in self.mardata.signatures.sigs:
              h = make_hasher(s.algorithm_id)
              hashers.append((s.algorithm_id, h))
  
          for block in get_signature_data(self.fileobj, self.mardata.signatures.filesize):
              [h.update(block) for (_, h) in hashers]
  
          return [(algo_id, h.finalize()) for (algo_id, h) in hashers]
docs: Return hashes of the contents of this MAR file.
  
          The hashes depend on the algorithms defined in the MAR file's signature block.
  
          Returns:
              A list of (algorithm_id, hash) tuples