code: def do_convert_and_check(g, graph_name, num_parts, expected_c_etypes):
      with tempfile.TemporaryDirectory() as root_dir:
          partition_graph(g, graph_name, num_parts, root_dir)
          part_config = os.path.join(root_dir, graph_name + ".json")
          old_config = _get_old_config(part_config)
          # Call convert function
          convert_conf(part_config)
          with open(part_config, "r") as config_f:
              config = json.load(config_f)
              # Check we get all canonical etypes
              assert Counter(expected_c_etypes) == Counter(
                  config["etypes"].keys()
              )
              # Check the id is match after transform from etypes -> canonical
              assert old_config["etypes"] == _extract_etypes(
                  config["etypes"]
              )
  
file_path: dgl/tests/tools/test_change_etype_to_canonical_etype.py
imports: import json
  import os
  import tempfile
  import unittest
  from collections import Counter
  import dgl
  import pytest
  from change_etype_to_canonical_etype import convert_conf, is_old_version
  from dgl.distributed import partition_graph
  from scipy import sparse
label_desc: Use image node_id 4 for calling a global function with example usage: do_convert_and_check(g, graph_name, num_parts, expected_c_etypes) without return types