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
  
imports: from mpi4py import MPI
  from math import pi
  from numpy import array
label_desc: Use image node_id 1 for calling a global function with example usage: get_n() and returns: n