def METHOD_NAME(size):
    import numpy as np
    filename = "image.png"
    image = np.random.randint(0, 256, size=size, dtype=np.uint8)
    with mlflow.start_run():
        mlflow.log_image(image, filename)
        artifact_uri = mlflow.get_artifact_uri()
        run_artifact_dir = local_file_uri_to_path(artifact_uri)
        assert os.listdir(run_artifact_dir) == [filename]