code: def _parse_partitions(partitions, auto_n):
      """Handles the partitions input for spark parallelization"""
      if partitions is None:
          partitions = None
      elif partitions == "auto":
          partitions = auto_n
      else:
          try:
              partitions = int(partitions)
          except:
              partitions = None
      return partitions
  
label_desc: Use image node_id 2 for calling a global function with example usage: _parse_partitions(partitions, auto_n) and returns: partitions