class_docstr: For heterogeneous graphs, it performs uniform random walks based on given metapaths. Optional
  parameters default to using the values passed in during construction.
  
  .. seealso::
  
     Examples using this random walk:
  
     - `Metapath2Vec link prediction <https://stellargraph.readthedocs.io/en/stable/demos/link-prediction/metapath2vec-link-prediction.html>`__
     - `Metapath2Vec unsupervised representation learning <https://stellargraph.readthedocs.io/en/stable/demos/embeddings/metapath2vec-embeddings.html>`__
  
     Related functionality:
  
     - :class:`.UnsupervisedSampler` for transforming random walks into links for unsupervised training of link prediction models
     - Other random walks: :class:`.UniformRandomWalk`, :class:`.BiasedRandomWalk`, :class:`.TemporalRandomWalk`.
  
  
  Args:
      graph (StellarGraph): Graph to traverse
      n (int, optional): Total number of random walks per root node
      length (int, optional): Maximum length of each random walk
      metapaths (list of list, optional): List of lists of node labels that specify a metapath schema, e.g.,
          [['Author', 'Paper', 'Author'], ['Author, 'Paper', 'Venue', 'Paper', 'Author']] specifies two metapath
          schemas of length 3 and 5 respectively.
      seed (int, optional): Random number generator seed
class_docstr_tok: ["For","heterogeneous","graphs",",","it","performs","uniform","random","walks","based","on","given","metapaths",".","Optional","parameters","default","to","using","the","values","passed","in","during","construction",".","..","seealso",":",":","Examples","using","this","random","walk",":","-","`","Metapath2Vec","link","prediction","<","https",":","\/\/stellargraph.readthedocs.io\/en\/stable\/demos\/link-prediction\/metapath2vec-link-prediction.html",">","`","__","-","`","Metapath2Vec","unsupervised","representation","learning","<","https",":","\/\/stellargraph.readthedocs.io\/en\/stable\/demos\/embeddings\/metapath2vec-embeddings.html",">","`","__","Related","functionality",":","-",":","class",":","`",".UnsupervisedSampler","`","for","transforming","random","walks","into","links","for","unsupervised","training","of","link","prediction","models","-","Other","random","walks",":",":","class",":","`",".UniformRandomWalk","`",",",":","class",":","`",".BiasedRandomWalk","`",",",":","class",":","`",".TemporalRandomWalk","`",".","Args",":","graph","(","StellarGraph",")",":","Graph","to","traverse","n","(","int",",","optional",")",":","Total","number","of","random","walks","per","root","node","length","(","int",",","optional",")",":","Maximum","length","of","each","random","walk","metapaths","(","list","of","list",",","optional",")",":","List","of","lists","of","node","labels","that","specify","a","metapath","schema",",","e.g.",",","[","[","'Author","'",",","'Paper","'",",","'Author","'","]",",","[","'Author",",","'Paper","'",",","'Venue","'",",","'Paper","'",",","'Author","'","]","]","specifies","two","metapath","schemas","of","length","3","and","5","respectively",".","seed","(","int",",","optional",")",":","Random","number","generator","seed"]
docstr: Checks that the parameter values are valid or raises ValueError exceptions with a message indicating the
  parameter (the first one encountered in the checks) with invalid value.
  
  Args:
      metapaths: <list> List of lists of node labels that specify a metapath schema, e.g.,
          [['Author', 'Paper', 'Author'], ['Author, 'Paper', 'Venue', 'Paper', 'Author']] specifies two metapath
          schemas of length 3 and 5 respectively.
docstr_tok: ["Checks","that","the","parameter","values","are","valid","or","raises","ValueError","exceptions","with","a","message","indicating","the","parameter","(","the","first","one","encountered","in","the","checks",")","with","invalid","value",".","Args",":","metapaths",":","<","list",">","List","of","lists","of","node","labels","that","specify","a","metapath","schema",",","e.g.",",","[","[","'Author","'",",","'Paper","'",",","'Author","'","]",",","[","'Author",",","'Paper","'",",","'Venue","'",",","'Paper","'",",","'Author","'","]","]","specifies","two","metapath","schemas","of","length","3","and","5","respectively","."]
code: def _check_metapath_values(self, metapaths):
      """
      Checks that the parameter values are valid or raises ValueError exceptions with a message indicating the
      parameter (the first one encountered in the checks) with invalid value.
  
      Args:
          metapaths: <list> List of lists of node labels that specify a metapath schema, e.g.,
              [['Author', 'Paper', 'Author'], ['Author, 'Paper', 'Venue', 'Paper', 'Author']] specifies two metapath
              schemas of length 3 and 5 respectively.
      """
  
      def raise_error(msg):
          raise ValueError(f"metapaths: {msg}, found {metapaths}")
  
      if type(metapaths) != list:
          raise_error("expected list of lists.")
      for metapath in metapaths:
          if type(metapath) != list:
              raise_error(
                  "expected each metapath to be a list of node labels"
              )
          if len(metapath) < 2:
              raise_error(
                  "expected each metapath to specify at least two node types"
              )
  
          for node_label in metapath:
              if type(node_label) != str:
                  raise_error(
                      "expected each node type in metapaths to be a string"
                  )
          if metapath[0] != metapath[-1]:
              raise_error(
                  "expected the first and last node type in a metapath to be the same"
              )
  
imports: import numpy
  import warnings
  from collections import defaultdict, deque
  from scipy import stats
  from scipy.special import softmax
  from ..core.schema import GraphSchema
  from ..core.graph import StellarGraph
  from ..core.utils import is_real_iterable
  from ..core.validation import require_integer_in_range, comma_sep
  from ..random import random_state
  from abc import ABC, abstractmethod
label_desc: Use image node_id 3 for calling the UniformRandomMetaPathWalk obj's underlying member method code with example usage: obj._check_metapath_values(metapaths) without return types