class_docstr: Adds additional edge types similar to :class:`AddMetaPaths`.
  The key difference is that the added edge type is given by
  multiple random walks along the metapath.
  One might want to increase the number of random walks
  via :obj:`walks_per_node` to achieve competitive performance with
  :class:`AddMetaPaths`.
  
  Args:
      metapaths (List[List[Tuple[str, str, str]]]): The metapaths described
          by a list of lists of
          :obj:`(src_node_type, rel_type, dst_node_type)` tuples.
      drop_orig_edge_types (bool, optional): If set to :obj:`True`, existing
          edge types will be dropped. (default: :obj:`False`)
      keep_same_node_type (bool, optional): If set to :obj:`True`, existing
          edge types between the same node type are not dropped even in case
          :obj:`drop_orig_edge_types` is set to :obj:`True`.
          (default: :obj:`False`)
      drop_unconnected_node_types (bool, optional): If set to :obj:`True`,
          will drop node types not connected by any edge type.
          (default: :obj:`False`)
      walks_per_node (int, List[int], optional): The number of random walks
          for each starting node in a metapth. (default: :obj:`1`)
      sample_ratio (float, optional): The ratio of source nodes to start
          random walks from. (default: :obj:`1.0`)
code: def forward(self, data: HeteroData) -> HeteroData:
      edge_types = data.edge_types  # save original edge types
      data.metapath_dict = {}
  
      for j, metapath in enumerate(self.metapaths):
          for edge_type in metapath:
              assert (
                  data._to_canonical(edge_type) in edge_types
              ), f"'{edge_type}' not present"
  
          src_node = metapath[0][0]
          num_nodes = data[src_node].num_nodes
          num_starts = round(num_nodes * self.sample_ratio)
          row = start = torch.randperm(num_nodes)[:num_starts].repeat(
              self.walks_per_node[j]
          )
  
          for i, edge_type in enumerate(metapath):
              edge_index = EdgeIndex(
                  data[edge_type].edge_index,
                  sparse_size=data[edge_type].size(),
              )
              col, mask = self.sample(edge_index, start)
              row, col = row[mask], col[mask]
              start = col
  
          new_edge_type = (
              metapath[0][0],
              f"metapath_{j}",
              metapath[-1][-1],
          )
          data[new_edge_type].edge_index = coalesce(
              torch.vstack([row, col])
          )
          data.metapath_dict[new_edge_type] = metapath
  
      postprocess(
          data,
          edge_types,
          self.drop_orig_edge_types,
          self.keep_same_node_type,
          self.drop_unconnected_node_types,
      )
  
      return data
  
imports: import warnings
  from typing import List, Optional, Tuple, Union, cast
  import torch
  from torch import Tensor
  from torch_geometric import EdgeIndex
  from torch_geometric.data import HeteroData
  from torch_geometric.data.datapipes import functional_transform
  from torch_geometric.transforms import BaseTransform
  from torch_geometric.typing import EdgeType
  from torch_geometric.utils import coalesce, degree
label_desc: Use image node_id 2 for calling the AddRandomMetaPaths obj's underlying member method code with example usage: obj.forward(data) and returns: data