code: def _prep_jid(self, clear_load, extra):
          '''
          Return a jid for this publication
          '''
          # the jid in clear_load can be None, '', or something else. this is an
          # attempt to clean up the value before passing to plugins
          passed_jid = clear_load['jid'] if clear_load.get('jid') else None
          nocache = extra.get('nocache', False)
  
          # Retrieve the jid
          fstr = '{0}.prep_jid'.format(self.opts['master_job_cache'])
          try:
              # Retrieve the jid
              jid = self.mminion.returners[fstr](nocache=nocache,
                                                 passed_jid=passed_jid)
          except (KeyError, TypeError):
              # The returner is not present
              msg = (
                  'Failed to allocate a jid. The requested returner \'{0}\' '
                  'could not be loaded.'.format(fstr.split('.')[0])
              )
              log.error(msg)
              return {'error': msg}
          return jif _prep_jid(self, clear_load, extra):
          '''
          Return a jid for this publication
          '''
          # the jid in clear_load can be None, '', or something else. this is an
          # attempt to clean up the value before passing to plugins
          passed_jid = clear_load['jid'] if clear_load.get('jid') else None
          nocache = extra.get('nocache', False)
  
          # Retrieve the jid
          fstr = '{0}.prep_jid'.format(self.opts['master_job_cache'])
          try:
              # Retrieve the jid
              jid = self.mminion.returners[fstr](nocache=nocache,
                                                 passed_jid=passed_jid)
          except (KeyError, TypeError):
              # The returner is not present
              msg = (
                  'Failed to allocate a jid. The requested returner \'{0}\' '
                  'could not be loaded.'.format(fstr.split('.')[0])
              )
              log.error(msg)
              return {'error': msg}
          return jid
docs: Return a jid for this publication