def extract_modelscope_checksum(data):
    """Extract SHA-256 checksum from ModelScope API response."""
    parsed_data = json.loads(data)
    if sha256_checksum := parsed_data.get("Data", {}).get("MetaContent", {}).get("Sha256"):
        return sha256_checksum
    else:
        raise ValueError("SHA-256 checksum not found in the API response.")
Extract SHA-256 checksum from ModelScope API response.
ramalama/modelscope.py