code: def test_load_save_hetero_graph(
      total_num_nodes,
      total_num_edges,
      num_ntypes,
      num_etypes,
      has_node_attrs,
      has_edge_attrs,
  ):
      (
          csc_indptr,
          indices,
          node_type_offset,
          type_per_edge,
          node_type_to_id,
          edge_type_to_id,
      ) = gbt.random_hetero_graph(
          total_num_nodes, total_num_edges, num_ntypes, num_etypes
      )
      node_attributes = None
      if has_node_attrs:
          node_attributes = {
              "A": torch.arange(total_num_nodes),
              "B": torch.arange(total_num_nodes),
          }
      edge_attributes = None
      if has_edge_attrs:
          edge_attributes = {
              "A": torch.arange(total_num_edges),
              "B": torch.arange(total_num_edges),
          }
      graph = gb.fused_csc_sampling_graph(
          csc_indptr,
          indices,
          node_type_offset=node_type_offset,
          type_per_edge=type_per_edge,
          node_type_to_id=node_type_to_id,
          edge_type_to_id=edge_type_to_id,
          node_attributes=node_attributes,
          edge_attributes=edge_attributes,
      )
  
      with tempfile.TemporaryDirectory() as test_dir:
          filename = os.path.join(
              test_dir, "fused_csc_sampling_graph.pt"
          )
          torch.save(graph, filename)
          graph2 = torch.load(filename)
  
      assert graph.total_num_nodes == graph2.total_num_nodes
      assert graph.total_num_edges == graph2.total_num_edges
  
      assert torch.equal(graph.csc_indptr, graph2.csc_indptr)
      assert torch.equal(graph.indices, graph2.indices)
      assert torch.equal(
          graph.node_type_offset, graph2.node_type_offset
      )
      assert torch.equal(graph.type_per_edge, graph2.type_per_edge)
      assert graph.node_type_to_id == graph2.node_type_to_id
      assert graph.edge_type_to_id == graph2.edge_type_to_id
      if has_node_attrs:
          assert (
              graph.node_attributes.keys()
              == graph2.node_attributes.keys()
          )
          for key in graph.node_attributes.keys():
              assert torch.equal(
                  graph.node_attributes[key],
                  graph2.node_attributes[key],
              )
      else:
          assert (
              graph.node_attributes is None
              and graph2.node_attributes is None
          )
      if has_edge_attrs:
          assert (
              graph.edge_attributes.keys()
              == graph2.edge_attributes.keys()
          )
          for key in graph.edge_attributes.keys():
              assert torch.equal(
                  graph.edge_attributes[key],
                  graph2.edge_attributes[key],
              )
      else:
          assert (
              graph.edge_attributes is None
              and graph2.edge_attributes is None
          )
  
imports: import os
  import pickle
  import re
  import tempfile
  import unittest
  import backend
  import dgl
  import dgl.graphbolt
  import pytest
  import torch
  import torch.multiprocessing
  from dgl.graphbolt.base import etype_str_to_tuple
  from scipy import sparse
  from ..None import gb_test_utils
label_desc: Use image node_id 11 for calling a global function with example usage: test_load_save_hetero_graph(total_num_nodes, total_num_edges, num_ntypes, num_etypes, has_node_attrs, has_edge_attrs) without return types