code: def get_md5_from_metadata(ase):
      # type: (blobxfer.models.azure.StorageEntity) -> str
      
      # if encryption metadata is present, check for pre-encryption
      # md5 in blobxfer extensions
      md5 = None
      if ase.is_encrypted:
          try:
              md5 = ase.encryption_metadata.blobxfer_extensions.\
                  pre_encrypted_content_md5
          except AttributeError:
              # this can happen if partial metadata is present
              md5 = None
      if blobxfer.util.is_none_or_empty(md5):
          md5 = ase.md5
      return md5
docs: Get MD5 from properties or metadata
      :param blobxfer.models.azure.StorageEntity ase: Azure Storage Entity
      :rtype: str or None
      :return: md5