code: def get_n():
      prompt = "Enter the number of intervals: (0 quits) "
      try:
          n = int(input(prompt))
          if n < 0:
              n = 0
      except:
          n = 0
      return n
  
file_path: mpi4py/demo/compute-pi/cpi-dpm.py
imports: import sys
  from mpi4py import MPI
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: get_n() and returns: n