code: def _file_md5(file_):
      
      md5 = hashlib.md5()
      chunk_size = 128 * md5.block_size
      for chunk in iter(lambda: file_.read(chunk_size), b''):
          md5.update(chunk)
      file_.seek(0)
      byte_digest = md5.digest()
      return base64.b64encode(byte_digest).decode()
docs: Compute the md5 digest of a file in base64 encoding.