code: def test_single():
      data = TestDatasetSingle()
      n = data.n_nodes
      loader = SingleLoader(data, sample_weights=np.ones(n), epochs=1)
      batches = list(loader)
      assert len(batches) == 1
  
      (x, a, e), y, sw = batches[0]
      assert x.shape == (n, f)
      assert a.shape == (n, n)
      assert (
          len(e.shape) == 2
          and e.shape[-1] == s
          and e.shape[0] == a.values.shape[0]
      )
      assert y.shape == (n, 2)
      assert loader.steps_per_epoch == 1
      signature = loader.tf_signature()
      assert len(signature[0]) == 3
  
imports: import numpy
  import scipy.sparse
  from spektral.data import BatchLoader, DisjointLoader
  from spektral.data.dataset import Dataset
  from spektral.data.graph import Graph
  from spektral.data.loaders import MixedLoader, PackedBatchLoader, SingleLoader
label_desc: Use image node_id 1 for calling a global function with example usage: test_single() without return types