code: def test_binary_blobs():
      blobs = data.binary_blobs(length=128)
      assert_almost_equal(blobs.mean(), 0.5, decimal=1)
      blobs = data.binary_blobs(length=128, volume_fraction=0.25)
      assert_almost_equal(blobs.mean(), 0.25, decimal=1)
      blobs = data.binary_blobs(
          length=32, volume_fraction=0.25, n_dim=3
      )
      assert_almost_equal(blobs.mean(), 0.25, decimal=1)
      other_realization = data.binary_blobs(
          length=32, volume_fraction=0.25, n_dim=3
      )
      assert not np.all(blobs == other_realization)
  
imports: import numpy
  import skimage.data
  from skimage.data._fetchers import _image_fetcher
  from skimage import io
  from skimage._shared.testing import assert_equal, assert_almost_equal, fetch
  import os
  import pytest
label_desc: Use image node_id 18 for calling a global function with example usage: test_binary_blobs() without return types