code: def random_partition(graph, npart):
      """Perform Random Partition over graph.
  
      For random partition, we try to make each part the same size.
      Return a `numpy.ndarray` denotes which cluster the node belongs to.
  
      Args:
  
          graph (pgl.Graph): The input graph for partition
  
          npart (int): The number of part in the final cluster.
  
      Returns:
  
          part_id (numpy.ndarray): An int64 numpy array with shape [num_nodes, ] denotes the cluster id.
  
      """
  
      if npart == 1:
          return np.zeros(graph.num_nodes, dtype=np.int64)
  
      cs = int(math.ceil(graph.num_nodes / npart))
      part_list = []
      for i in range(npart):
          part_list.extend([i] * cs)
      part_list = part_list[: graph.num_nodes]
      part_id = np.array(part_list, dtype=np.int64)
      np.random.shuffle(part_id)
  
      return part_id
  
file_path: PGL/pgl/partition.py
imports: import math
  import numpy
  from pgl.graph_kernel import metis_partition
  from pgl.utils.helper import check_is_tensor
  from pgl.utils.logger import log
label_desc: Use image node_id 3 for calling a global function with example usage: random_partition(graph, npart) and returns: part_id, np