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"]
code: def __init__(
      self,
      graph,
      n=None,
      length=None,
      metapaths=None,
      seed=None,
  ):
      super().__init__(graph, seed=seed)
      self.n = n
      self.length = length
      self.metapaths = metapaths
  
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 1 to create a new UniformRandomMetaPathWalk object from inherited base classes: RandomWalk with example: obj = UniformRandomMetaPathWalk(graph, n, length, metapaths, seed)