@staticmethod
def get_sha256_from_pypi_metadata(pypi_metadata: dict) ->str:
    """Get the sha256 from pypi metadata

        :param pypi_metadata: pypi metadata
        :return: sha256 value for the sdist package
        """
    for pkg_info in pypi_metadata.get('urls'):
        if pkg_info.get('packagetype', '') == 'sdist':
            return pkg_info['digests']['sha256']
    raise AttributeError(
        'Hash information for sdist was not found on PyPi metadata.')
