code: def test_metis_partition(idtype):
      # TODO(zhengda) Metis fails to partition a small graph.
      g = create_large_graph(1000, idtype=idtype)
      if idtype == F.int64:
          check_metis_partition(g, 0)
          check_metis_partition(g, 1)
          check_metis_partition(g, 2)
          check_metis_partition_with_constraint(g)
      else:
          assert_fail = False
          try:
              check_metis_partition(g, 1)
          except:
              assert_fail = True
          assert assert_fail
  
imports: import math
  import os
  import unittest
  import backend
  import dgl
  import dgl.function
  import dgl.partition
  import networkx
  import numpy
  import pytest
  from scipy import sparse
  from utils import parametrize_idtype
  from utils.graph_cases import get_cases
label_desc: Use image node_id 18 for calling a global function with example usage: test_metis_partition(idtype) without return types