def METHOD_NAME(self, model_version, in_tempdir, random_data):
    filename = "tiny1.bin"
    FILE_CONTENTS = random_data
    with open(filename, "wb") as f:
        f.write(FILE_CONTENTS)
    model_version.log_artifact("file", filename)
    # retrieve the artifact:
    retrieved_file = model_version.get_artifact("file")
    assert retrieved_file.getvalue() == FILE_CONTENTS