code: def test_parameter_checking(self):
      g = create_test_graph()
      mrw = UniformRandomMetaPathWalk(g)
  
      nodes = [1]
      n = 1
      length = 2
      seed = None
      metapaths = [["n", "s", "n"]]
  
      # nodes should be a list of node ids even for a single node
      with pytest.raises(ValueError):
          mrw.run(
              nodes=None,
              n=n,
              length=length,
              metapaths=metapaths,
              seed=seed,
          )
      with pytest.raises(ValueError):
          mrw.run(
              nodes=0,
              n=n,
              length=length,
              metapaths=metapaths,
              seed=seed,
          )
      # n has to be positive integer
      with pytest.raises(ValueError):
          mrw.run(
              nodes=nodes,
              n=-1,
              length=length,
              metapaths=metapaths,
              seed=seed,
          )
      with pytest.raises(TypeError):
          mrw.run(
              nodes=nodes,
              n=11.4,
              length=length,
              metapaths=metapaths,
              seed=seed,
          )
      with pytest.raises(ValueError):
          mrw.run(
              nodes=nodes,
              n=0,
              length=length,
              metapaths=metapaths,
              seed=seed,
          )
      # length has to be positive integer
      with pytest.raises(ValueError):
          mrw.run(
              nodes=nodes,
              n=n,
              length=-3,
              metapaths=metapaths,
              seed=seed,
          )
      with pytest.raises(ValueError):
          mrw.run(
              nodes=nodes, n=n, length=0, metapaths=metapaths, seed=seed
          )
      with pytest.raises(TypeError):
          mrw.run(
              nodes=nodes,
              n=n,
              length=4.6,
              metapaths=metapaths,
              seed=seed,
          )
      with pytest.raises(TypeError):
          mrw.run(
              nodes=nodes,
              n=n,
              length=1.0000001,
              metapaths=metapaths,
              seed=seed,
          )
      # metapaths have to start and end with the same node type
      with pytest.raises(ValueError):
          mrw.run(
              nodes=nodes,
              n=n,
              length=length,
              metapaths=[["s", "n"]],
              seed=seed,
          )
      with pytest.raises(ValueError):
          mrw.run(
              nodes=nodes,
              n=n,
              length=length,
              metapaths=[["s", "n", "s"], ["n", "s"]],
              seed=seed,
          )
      # metapaths have to have minimum length of two
      with pytest.raises(ValueError):
          mrw.run(
              nodes=nodes,
              n=n,
              length=length,
              metapaths=[["s"]],
              seed=seed,
          )
      # metapaths has to be a list of lists of strings denoting the node labels
      with pytest.raises(ValueError):
          mrw.run(
              nodes=nodes,
              n=n,
              length=length,
              metapaths=["n", "s"],
              seed=seed,
          )
      with pytest.raises(ValueError):
          mrw.run(
              nodes=nodes,
              n=n,
              length=length,
              metapaths=[[1, 2]],
              seed=seed,
          )
      with pytest.raises(ValueError):
          mrw.run(
              nodes=nodes,
              n=n,
              length=length,
              metapaths=[["n", "s"], []],
              seed=seed,
          )
      with pytest.raises(ValueError):
          mrw.run(
              nodes=nodes,
              n=n,
              length=length,
              metapaths=[["n", "s"], ["s", 1]],
              seed=seed,
          )
      with pytest.raises(ValueError):
          mrw.run(
              nodes=nodes,
              n=n,
              length=length,
              metapaths=[("n", "s")],
              seed=seed,
          )
      with pytest.raises(ValueError):
          mrw.run(
              nodes=nodes,
              n=n,
              length=length,
              metapaths=(["n", "s"], ["s", "n", "s"]),
              seed=seed,
          )
      # seed has to be integer or None
      with pytest.raises(ValueError):
          mrw.run(
              nodes=nodes,
              n=n,
              length=length,
              metapaths=metapaths,
              seed=-1,
          )
      with pytest.raises(TypeError):
          mrw.run(
              nodes=nodes,
              n=n,
              length=length,
              metapaths=metapaths,
              seed=1000.345,
          )
  
      # 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.
      walks = mrw.run(
          nodes=[], n=n, length=length, metapaths=metapaths, seed=seed
      )
      assert len(walks) == 0
  
file_path: stellargraph/tests/data/test_metapath_walker.py
imports: import pandas
  import numpy
  import pytest
  from stellargraph.data.explorer import UniformRandomMetaPathWalk
  from stellargraph.core.graph import StellarGraph
  from ..test_utils.graphs import example_graph_random
label_desc: Use image node_id 1 for calling the TestMetaPathWalk obj's underlying member method code with example usage: obj.test_parameter_checking() without return types