code: def metis_graph_partition(graph, npart):
      """Using metis partition over graph into small clusters.
  
      Args:
  
          graph (pgl.Graph): The input graph for partition.
  
          npart (int): The number of parts in the final graph partition.
  
      Returns:
  
          permutation (numpy.ndarray): An 1-D numpy array, which is the new permutation of nodes in partition graph,
                                       and the shape is [num_nodes].
  
          part (numpy.ndarray): An 1-D numpy array, which helps distinguish different parts of permutation,
                                and the shape is [npart + 1].
  
      """
  
      if sys.platform == "win32":
          raise NotImplementedError(
              f"We currently do not support metis partition on Windows system. "
              f"You can use random graph partition instead."
          )
  
      metis_part = metis_partition(graph, npart)
      permutation = np.argsort(metis_part)
  
      part = np.zeros(npart + 1, dtype=np.int64)
      for i in range(npart):
          part[i + 1] = part[i] + len(np.where(metis_part == i)[0])
  
      return permutation, part
  
imports: import sys
  import math
  import numpy
  import pgl
  from pgl.utils.logger import log
  from pgl.partition import random_partition, metis_partition
label_desc: Use image node_id 2 for calling a global function with example usage: metis_graph_partition(graph, npart) and returns: permutation,  part