code: def test_batch_netypes():
      # Test for https://github.com/dmlc/dgl/issues/2808
      import networkx as nx
  
      B = nx.DiGraph()
      B.add_nodes_from(
          [1, 2, 3, 4],
          bipartite=0,
          some_attr=F.tensor([1, 2, 3, 4], dtype=F.float32),
      )
      B.add_nodes_from(["a", "b", "c"], bipartite=1)
      B.add_edges_from(
          [(1, "a"), (1, "b"), (2, "b"), (2, "c"), (3, "c"), (4, "a")]
      )
  
      g_dict = {
          0: dgl.bipartite_from_networkx(B, "A", "e", "B"),
          1: dgl.bipartite_from_networkx(B, "B", "e", "A"),
          2: dgl.bipartite_from_networkx(
              B, "A", "e", "B", u_attrs=["some_attr"]
          ),
          3: dgl.bipartite_from_networkx(
              B, "B", "e", "A", u_attrs=["some_attr"]
          ),
      }
      for _, g in g_dict.items():
          dgl.batch((g, g, g))
  
file_path: dgl/tests/python/common/test_batch-heterograph.py
imports: import unittest
  import backend
  import dgl
  import pytest
  from dgl.base import ALL
  from utils import check_graph_equal, get_cases, parametrize_idtype
label_desc: Use image node_id 9 for calling a global function with example usage: test_batch_netypes() without return types