code: def test_partition_policy():
      assert node_policy.part_id == 0
      assert edge_policy.part_id == 0
      local_nid = node_policy.to_local(F.tensor([0, 1, 2, 3, 4, 5]))
      local_eid = edge_policy.to_local(F.tensor([0, 1, 2, 3, 4, 5, 6]))
      assert_array_equal(
          F.asnumpy(local_nid),
          F.asnumpy(F.tensor([0, 1, 2, 3, 4, 5], F.int64)),
      )
      assert_array_equal(
          F.asnumpy(local_eid),
          F.asnumpy(F.tensor([0, 1, 2, 3, 4, 5, 6], F.int64)),
      )
      nid_partid = node_policy.to_partid(
          F.tensor([0, 1, 2, 3, 4, 5], F.int64)
      )
      eid_partid = edge_policy.to_partid(
          F.tensor([0, 1, 2, 3, 4, 5, 6], F.int64)
      )
      assert_array_equal(
          F.asnumpy(nid_partid),
          F.asnumpy(F.tensor([0, 0, 0, 0, 0, 0], F.int64)),
      )
      assert_array_equal(
          F.asnumpy(eid_partid),
          F.asnumpy(F.tensor([0, 0, 0, 0, 0, 0, 0], F.int64)),
      )
      assert node_policy.get_part_size() == len(local_nid)
      assert edge_policy.get_part_size() == len(local_eid)
  
imports: import multiprocessing
  import os
  import socket
  import time
  import unittest
  import backend
  import dgl
  import numpy
  from dgl.graph_index import create_graph_index
  from numpy.testing import assert_array_equal
  from scipy import sparse
  from utils import generate_ip_config, reset_envs
label_desc: Use image node_id 4 for calling a global function with example usage: test_partition_policy() without return types