code: def test_not_an_image(tmp_path):
      fname = str(tmp_path / "notanimage.bsdf")
  
      # Not an image not a list
      bsdf.save(fname, 1)
      with raises(RuntimeError):
          iio.imread(fname)
  
      # A list with non-images
      bsdf.save(fname, [1])
      with raises(RuntimeError):
          iio.imread(fname)
  
      # An empty list could work though
      bsdf.save(fname, [])
      with raises(IndexError):
          iio.imread(fname)
      assert iio.mimread(fname) == []
  
file_path: imageio/tests/test_bsdf.py
imports: import numpy
  from pytest import raises
  from imageio import core
  import imageio.v2
  from imageio.plugins import _bsdf
  import pytest
  import sys
  from conftest import deprecated_test
label_desc: Use image node_id 2 for calling a global function with example usage: test_not_an_image(tmp_path) without return types