def METHOD_NAME(data_sha256: str, data: bytes) -> None:
    assert data is not None
    assert isinstance(data, bytes)
    if len(data) == 0:
        log.warning("Not saving 0-length data blob")
        return
    if STORE_MSG_ON_S3:
        _save_to_s3(data_sha256, data)
    else:
        directory = _data_file_directory(data_sha256)
        os.makedirs(directory, exist_ok=True)
        with open(_data_file_path(data_sha256), "wb") as f:
            f.write(data)