code: def test_batch_keeps_empty_data(idtype):
      g1 = (
          dgl.heterograph({("a", "to", "a"): ([], [])})
          .astype(idtype)
          .to(F.ctx())
      )
      g1.nodes["a"].data["nh"] = F.tensor([])
      g1.edges[("a", "to", "a")].data["eh"] = F.tensor([])
      g2 = (
          dgl.heterograph({("a", "to", "a"): ([], [])})
          .astype(idtype)
          .to(F.ctx())
      )
      g2.nodes["a"].data["nh"] = F.tensor([])
      g2.edges[("a", "to", "a")].data["eh"] = F.tensor([])
      g = dgl.batch([g1, g2])
      assert "nh" in g.nodes["a"].data
      assert "eh" in g.edges[("a", "to", "a")].data
  
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 8 for calling a global function with example usage: test_batch_keeps_empty_data(idtype) without return types