code: def test_FeatureFetcher_with_edges_hetero():
      a = torch.tensor([[random.randint(0, 10)] for _ in range(20)])
      b = torch.tensor([[random.randint(0, 10)] for _ in range(50)])
  
      def add_node_and_edge_ids(seeds):
          subgraphs = []
          original_edge_ids = {
              "n1:e1:n2": torch.randint(0, 50, (10,)),
              "n2:e2:n1": torch.randint(0, 50, (10,)),
          }
          original_column_node_ids = {
              "n1": torch.randint(0, 20, (10,)),
              "n2": torch.randint(0, 20, (10,)),
          }
          original_row_node_ids = {
              "n1": torch.randint(0, 20, (10,)),
              "n2": torch.randint(0, 20, (10,)),
          }
          for _ in range(3):
              subgraphs.append(
                  gb.SampledSubgraphImpl(
                      sampled_csc={
                          "n1:e1:n2": gb.CSCFormatBase(
                              indptr=torch.arange(11),
                              indices=torch.arange(10),
                          ),
                          "n2:e2:n1": gb.CSCFormatBase(
                              indptr=torch.arange(11),
                              indices=torch.arange(10),
                          ),
                      },
                      original_column_node_ids=original_column_node_ids,
                      original_row_node_ids=original_row_node_ids,
                      original_edge_ids=original_edge_ids,
                  )
              )
          data = gb.MiniBatch(
              input_nodes=seeds, sampled_subgraphs=subgraphs
          )
          return data
  
      features = {}
      keys = [("node", "n1", "a"), ("edge", "n1:e1:n2", "a")]
      features[keys[0]] = gb.TorchBasedFeature(a)
      features[keys[1]] = gb.TorchBasedFeature(b)
      feature_store = gb.BasicFeatureStore(features)
  
      itemset = gb.ItemSetDict(
          {
              "n1": gb.ItemSet(torch.randint(0, 20, (10,))),
          }
      )
      item_sampler_dp = gb.ItemSampler(itemset, batch_size=2)
      converter_dp = Mapper(item_sampler_dp, add_node_and_edge_ids)
      fetcher_dp = gb.FeatureFetcher(
          converter_dp,
          feature_store,
          {"n1": ["a"]},
          {"n1:e1:n2": ["a"]},
      )
  
      assert len(list(fetcher_dp)) == 5
      for data in fetcher_dp:
          assert data.node_features[("n1", "a")].size(0) == 2
          assert len(data.edge_features) == 3
          for edge_feature in data.edge_features:
              assert edge_feature[("n1:e1:n2", "a")].size(0) == 10
  
file_path: dgl/tests/python/pytorch/graphbolt/test_feature_fetcher.py
imports: import random
  from enum import Enum
  import dgl.graphbolt
  import pytest
  import torch
  from torchdata.datapipes.iter import Mapper
  from .None import gb_test_utils
label_desc: Use image node_id 6 for calling a global function with example usage: test_FeatureFetcher_with_edges_hetero() and returns: data