class_docstr: The sampling output of a :class:`~torch_geometric.sampler.BaseSampler`
  on homogeneous graphs.
  
  Args:
      node (torch.Tensor): The sampled nodes in the original graph.
      row (torch.Tensor): The source node indices of the sampled subgraph.
          Indices must be re-indexed to :obj:`{ 0, ..., num_nodes - 1 }`
          corresponding to the nodes in the :obj:`node` tensor.
      col (torch.Tensor): The destination node indices of the sampled
          subgraph.
          Indices must be re-indexed to :obj:`{ 0, ..., num_nodes - 1 }`
          corresponding to the nodes in the :obj:`node` tensor.
      edge (torch.Tensor, optional): The sampled edges in the original graph.
          This tensor is used to obtain edge features from the original
          graph. If no edge attributes are present, it may be omitted.
      batch (torch.Tensor, optional): The vector to identify the seed node
          for each sampled node. Can be present in case of disjoint subgraph
          sampling per seed node. (default: :obj:`None`)
      num_sampled_nodes (List[int], optional): The number of sampled nodes
          per hop. (default: :obj:`None`)
      num_sampled_edges (List[int], optional): The number of sampled edges
          per hop. (default: :obj:`None`)
      metadata: (Any, optional): Additional metadata information.
          (default: :obj:`None`)
docstr: Converts the sampled subgraph into a bidirectional variant, in
  which all sampled edges are guaranteed to be bidirectional.
docstr_tok: ["Converts","the","sampled","subgraph","into","a","bidirectional","variant",",","in","which","all","sampled","edges","are","guaranteed","to","be","bidirectional","."]
code: def to_bidirectional(self) -> "SamplerOutput":
      r"""Converts the sampled subgraph into a bidirectional variant, in
      which all sampled edges are guaranteed to be bidirectional.
      """
      out = copy.copy(self)
  
      out.row, out.col, out.edge = to_bidirectional(
          row=self.row,
          col=self.col,
          rev_row=self.row,
          rev_col=self.col,
          edge_id=self.edge,
          rev_edge_id=self.edge,
      )
      out.num_sampled_nodes = out.num_sampled_edges = None
  
      return out
  
imports: import copy
  import math
  import warnings
  from abc import ABC
  from collections import defaultdict
  from dataclasses import dataclass
  from enum import Enum
  from typing import Any, Dict, List, Optional, Union
  import torch
  from torch import Tensor
  from torch_geometric.data import Data, FeatureStore, GraphStore, HeteroData
  from torch_geometric.sampler.utils import to_bidirectional
  from torch_geometric.typing import EdgeType, EdgeTypeStr, NodeType, OptTensor
  from torch_geometric.utils.mixin import CastMixin
label_desc: Use image node_id 1 for calling the SamplerOutput obj's underlying member method code with example usage: obj.to_bidirectional() and returns: out