code: def test_singleton(test_images, tmp_path):
      im1 = iio.imread(test_images / "chelsea.png")
  
      fname = str(tmp_path / "chelsea.bsdf")
      iio.imsave(fname, im1)
  
      # Does it look alright if we open it in bsdf without extensions?
      raw = bsdf.load(fname, [])
      assert isinstance(raw, dict)
      assert set(raw.keys()) == set(["meta", "array"])
      assert isinstance(raw["meta"], dict)
      assert isinstance(raw["array"], dict)
      assert raw["array"]["shape"] == list(im1.shape)
      assert isinstance(raw["array"]["data"], bytes)
  
      # Read singleton image as singleton
      im2 = iio.imread(fname)
      assert np.all(im1 == im2)
  
      # Read singleton image as series
      ims = iio.mimread(fname)
      assert len(ims) == 1 and np.all(im1 == ims[0])
  
      # Read + write back without image extensions
      bsdf.save(fname, bsdf.load(fname))
      im3 = iio.mimread(fname)
      assert np.all(im1 == im3)
  
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 3 for calling a global function with example usage: test_singleton(test_images, tmp_path) without return types