code: def test_walker_uniform_random(line_graph):
      length = 3
      number_of_walks = 2
      batch_size = 4
  
      walker = UniformRandomWalk(
          line_graph, n=number_of_walks, length=length
      )
      sampler = UnsupervisedSampler(line_graph, walker=walker)
  
      batches = sampler.run(batch_size)
  
      # batches should match the parameters used to create the walker object, instead of the defaults
      # for UnsupervisedSampler
      expected_num_batches = np.ceil(
          line_graph.number_of_nodes()
          * number_of_walks
          * (length - 1)
          * 2
          / batch_size
      )
      assert len(batches) == expected_num_batches
  
file_path: stellargraph/tests/data/test_unsupervised_sampler.py
imports: import pytest
  import numpy
  from collections import defaultdict
  from stellargraph.data.unsupervised_sampler import UnsupervisedSampler
  from stellargraph.data.explorer import UniformRandomWalk
  from ..test_utils.graphs import line_graph
label_desc: Use image node_id 4 for calling a global function with example usage: test_walker_uniform_random(line_graph) without return types