code: def test_walk_generation_loner_root_node(self):
      g = create_test_graph()
      urw = UniformRandomWalk(g)
  
      nodes = ["loner"]  # this node has no edges including itself
      n = 1
      length = 1
      seed = None
  
      subgraphs = urw.run(nodes=nodes, n=n, length=length, seed=seed)
      assert len(subgraphs) == 1
      assert (
          len(subgraphs[0]) == 1
      )  # always 1 since only the root node can every be added to the walk
  
      n = 10
      length = 1
      subgraphs = urw.run(nodes=nodes, n=n, length=length, seed=seed)
      assert len(subgraphs) == n
      for subgraph in subgraphs:
          assert (
              len(subgraph) == 1
          )  # always 1 since only the root node can ever be added to the walk
  
      n = 10
      length = 10
      subgraphs = urw.run(nodes=nodes, n=n, length=length, seed=seed)
      assert len(subgraphs) == n
      for subgraph in subgraphs:
          assert len(subgraph) == 1
  
file_path: stellargraph/tests/data/test_uniform_random_walker.py
imports: import pytest
  import numpy
  from stellargraph.data.explorer import UniformRandomWalk
  from ..test_utils.graphs import create_test_graph, example_graph_random
label_desc: Use image node_id 4 for calling the TestUniformRandomWalk obj's underlying member method code with example usage: obj.test_walk_generation_loner_root_node() without return types