code: def setup_partitioner(index, num_procs, gnum_cells, parts):
      """create a partitioner in the engine namespace"""
      global partitioner
      p = MPIRectPartitioner2D(
          my_id=index, num_procs=num_procs
      )  # noqa: F821
      p.redim(global_num_cells=gnum_cells, num_parts=parts)
      p.prepare_communication()
      # put the partitioner into the global namespace:
      partitioner = p
  
imports: import argparse
  import time
  from numpy import sqrt
  import ipyparallel
label_desc: Use image node_id 1 for calling a global function with example usage: setup_partitioner(index, num_procs, gnum_cells, parts) without return types