code: def _processing_limit(self, spec):
      
      processing_rate = float(spec.mapper.params.get("processing_rate", 0))
      slice_processing_limit = -1
      if processing_rate > 0:
        slice_processing_limit = int(math.ceil(
            parameters.config._SLICE_DURATION_SEC*processing_rate/
            int(spec.mapper.shard_count)))
      return slice_processing_limit
docs: Get the limit on the number of map calls allowed by this slice.
  
      Args:
        spec: a Mapreduce spec.
  
      Returns:
        The limit as a positive int if specified by user. -1 otherwise.