code: def test_parameter_checking(self):
      g = create_test_graph()
      biasedrw = BiasedRandomWalk(g)
  
      nodes = ["0"]
      n = 1
      length = 2
      p = 1.0
      q = 1.0
      seed = None
  
      with pytest.raises(ValueError):
          # nodes should be a list of node ids even for a single node
          biasedrw.run(
              nodes=None, n=n, p=p, q=q, length=length, seed=seed
          )
      with pytest.raises(ValueError):
          biasedrw.run(
              nodes="0", n=n, p=p, q=q, length=length, seed=seed
          )  # can't just pass a node id, need list, e.g., ["0"]
  
      # n has to be positive integer
      with pytest.raises(ValueError):
          biasedrw.run(
              nodes=nodes, n=0, p=p, q=q, length=length, seed=seed
          )
      with pytest.raises(ValueError):
          biasedrw.run(
              nodes=nodes, n=-121, p=p, q=q, length=length, seed=seed
          )
      with pytest.raises(TypeError):
          biasedrw.run(
              nodes=nodes, n=21.4, p=p, q=q, length=length, seed=seed
          )
      with pytest.raises(TypeError):
          biasedrw.run(
              nodes=nodes, n=-0.5, p=p, q=q, length=length, seed=seed
          )
      with pytest.raises(TypeError):
          biasedrw.run(
              nodes=nodes, n=0.0001, p=p, q=q, length=length, seed=seed
          )
      with pytest.raises(TypeError):
          biasedrw.run(
              nodes=nodes, n="2", p=p, q=q, length=length, seed=seed
          )
  
      # p has to be > 0.
      with pytest.raises(ValueError):
          biasedrw.run(
              nodes=nodes, n=n, p=0.0, q=q, length=length, seed=seed
          )
      with pytest.raises(ValueError):
          biasedrw.run(
              nodes=nodes, n=n, p=-0.25, q=q, length=length, seed=seed
          )
      with pytest.raises(ValueError):
          biasedrw.run(
              nodes=nodes, n=n, p=-1, q=q, length=length, seed=seed
          )
  
      # q has to be > 0.
      with pytest.raises(ValueError):
          biasedrw.run(
              nodes=nodes, n=n, p=p, q=0.0, length=length, seed=seed
          )
      with pytest.raises(ValueError):
          biasedrw.run(
              nodes=nodes, n=n, p=p, q=-0.9, length=length, seed=seed
          )
      with pytest.raises(ValueError):
          biasedrw.run(
              nodes=nodes, n=n, p=p, q=-75, length=length, seed=seed
          )
  
      # length has to be positive integer
      with pytest.raises(ValueError):
          biasedrw.run(nodes=nodes, n=n, p=p, q=q, length=0, seed=seed)
      with pytest.raises(ValueError):
          biasedrw.run(nodes=nodes, n=n, p=p, q=q, length=-5, seed=seed)
      with pytest.raises(TypeError):
          biasedrw.run(
              nodes=nodes, n=n, p=p, q=q, length=11.9, seed=seed
          )
      with pytest.raises(TypeError):
          biasedrw.run(
              nodes=nodes, n=n, p=p, q=q, length=-9.9, seed=seed
          )
      with pytest.raises(TypeError):
          biasedrw.run(
              nodes=nodes, n=n, p=p, q=q, length="10", seed=seed
          )
  
      # seed has to be None, 0,  or positive integer
      with pytest.raises(ValueError):
          biasedrw.run(
              nodes=nodes, n=n, p=p, q=q, length=length, seed=-1
          )
      with pytest.raises(TypeError):
          biasedrw.run(
              nodes=nodes, n=n, p=p, q=q, length=length, seed=1010.8
          )
  
      # If no root nodes are given, an empty list is returned which is not an error but I thought this method
      # is the best for checking this behaviour.
      nodes = []
      subgraph = biasedrw.run(
          nodes=nodes, n=n, p=p, q=q, length=length, seed=None
      )
      assert len(subgraph) == 0
  
imports: import numpy
  import pandas
  import pytest
  import networkx
  from stellargraph.data.explorer import BiasedRandomWalk
  from stellargraph.core.graph import StellarGraph
  from ..test_utils.graphs import create_test_graph, example_graph_random
label_desc: Use image node_id 1 for calling the TestBiasedRandomWalk obj's underlying member method code with example usage: obj.test_parameter_checking() without return types