code: def process(self, job_id):
          
  
          self._logger.info(
              '{:.2f}: Process job {}'.format(self._env.now, job_id)
          )
  
          # log time of commencement of service
          self._observer.notify_service(time=self._env.now, job_id=job_id)
  
          # draw a new service time
          try:
              service_time = next(self._service_time_generator)
          except StopIteration:
              # ERROR: no more service times
              error_msg = ('Service time generator exhausted')
              self._logger.error(error_msg)
  
              # raise a different exception, as simpy uses StopIteration to
              # signify end of process (generator)
              raise GGCQServiceTimeStopIteration(error_msg)
  
          # wait for the service time to pass
          try:
              self._logger.debug('Service time: {:.2f}'.format(service_time))
          except:
              pass
  
          try:
              yield self._env.timeout(service_time)
  
          except TypeError:
              # error: service time of wrong type
              error_msg = (
                  "service time '{}' has wrong type '{}'".format(
                      service_time, type(service_time).__name__
                  )
              )
              self._logger.error(error_msg)
  
              # trigger exception
              raise GGCQServiceTimeTypeError(error_msg)
  
          except ValueError as exc:
              if str(exc).startswith('Negative delay'):
                  # error: negative service time
                  error_msg = (
                      "negative service time {:.2f}".format(
                          service_time
                      )
                  )
                  self._logger.error(error_msg)
  
                  # trigger exception
                  raise GGCQNegativeServiceTimeError(error_msg)
              else:
                  raise
  
          # job finished processing -> departing
          self._logger.info(
              '{:.2f}: Finished processing job {}'.format(self._env.now, job_id)
          )
          # log departure epoch
          self._observer.notify_departure(time=self._env.now, job_id=job_id)
docs: Process a job by the queue