code: def _get_old_config(part_config):
      with open(part_config, "r+") as config_f:
          config = json.load(config_f)
          if not is_old_version(config):
              config["etypes"] = _extract_etypes(config["etypes"])
              config["edge_map"] = _extract_edge_map(config["edge_map"])
              config_f.seek(0)
              json.dump(config, config_f, indent=4)
              config_f.truncate()
          return config
  
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 5 for calling a global function with example usage: _get_old_config(part_config) and returns: config