def METHOD_NAME(data: Union[IO[bytes], bytes]) -> str:
    if isinstance(data, bytes):
        value = data
    else:
        data.seek(0)
        value = data.read()
        data.seek(0)
    return "sha256:" + hashlib.sha256(value).hexdigest()