code: def test_homogeneous_to_bidirectional():
      edge_index = get_random_edge_index(10, 10, num_edges=20)
  
      obj = SamplerOutput(
          node=torch.arange(10),
          row=edge_index[0],
          col=edge_index[0],
          edge=torch.arange(edge_index.size(1)),
      ).to_bidirectional()
  
      assert is_undirected(torch.stack([obj.row, obj.col], dim=0))
  
file_path: pytorch_geometric/test/sampler/test_sampler_base.py
imports: import pytest
  import torch
  from torch_geometric.sampler.base import HeteroSamplerOutput, NumNeighbors, SamplerOutput
  from torch_geometric.testing import get_random_edge_index
  from torch_geometric.utils import is_undirected
label_desc: Use image node_id 5 for calling a global function with example usage: test_homogeneous_to_bidirectional() without return types