def worker(job):
    """Primary |worker| coroutine. This is a |pull| object that pulls jobs from
    a source and yield evaluated results.

    Input should be of type |JobMessage|, output of type |ResultMessage|.

    .. |worker| replace:: :py:func::`worker`"""
    if job is EndOfQueue:
        return

    if not isinstance(job, JobMessage):
        print("Warning: Job should be communicated using `JobMessage`.",
              file=sys.stderr)

    key, node = job
    return run_job(key, node)
Primary |worker| coroutine. This is a |pull| object that pulls jobs from
    a source and yield evaluated results.

    Input should be of type |JobMessage|, output of type |ResultMessage|.

    .. |worker| replace:: :py:func::`worker`