def METHOD_NAME(self):
    """If possible, get a job from our own job queue; otherwise, get one from the global job queue.
    Return None if neither queue has work to do.
    Non-blocking.
    """
    try:
        return self.job_queue.get_nowait()
    except queue.Empty:
        try:
            task = self.thread_pool.unassigned_tasks.get_nowait()
        except queue.Empty:
            return None
        else:
            # If this fails, then your callable is some built-in that doesn't allow arbitrary
            # members (e.g. .assigned_worker) to be "monkey-patched" onto it.
            # You may have to wrap it in a custom class first.
            task.assigned_worker = self
            return task