code: def adjustEndingReservationForJob(reservation, jobShape, wallTime):
      
      if jobShape.wallTime - wallTime < reservation.shape.wallTime:
          # This job only partially fills one of the slices. Create a new slice.
          reservation.shape, nS = split(reservation.shape, jobShape, jobShape.wallTime - wallTime)
          nS.nReservation = reservation.nReservation
          reservation.nReservation = nS
      else:
          # This job perfectly fits within the boundaries of the slices.
          reservation.subtract(jobShape)
docs: Add a job to an ending reservation that ends at wallTime, splitting
      the reservation if the job doesn't fill the entire timeslice.