code: def get_valid_times_for_job_workflow(self, num_job, allow_overlap=True):
          
          # small factor of 0.0001 to avoid float round offs causing us to
          # miss a second at end of segments.
          shift_dur = self.curr_seg[0] + int(self.job_time_shift * num_job\
                                             + 0.0001)
          job_valid_seg = self.valid_chunk.shift(shift_dur)
          # If we need to recalculate the valid times to avoid overlap
          if not allow_overlap:
              data_per_job = (self.curr_seg_length - self.data_loss) / \
                             float(self.num_jobs)
              lower_boundary = num_job*data_per_job + \
                                   self.valid_chunk[0] + self.curr_seg[0]
              upper_boundary = data_per_job + lower_boundary
              # NOTE: Convert to int after calculating both boundaries
              # small factor of 0.0001 to avoid float round offs causing us to
              # miss a second at end of segments.
              lower_boundary = int(lower_boundary)
              upper_boundary = int(upper_boundary + 0.0001)
              if lower_boundary < job_valid_seg[0] or \
                      upper_boundary > job_valid_seg[1]:
                  err_msg = ("Workflow is attempting to generate output "
                            "from a job at times where it is not valid.")
                  raise ValueError(err_msg)
              job_valid_seg = segments.segment([lower_boundary,
                                                upper_boundary])
          return job_valid_seg
docs: Get the times for which the job num_job will be valid, using workflow's
          method.