def get_worker(*queue_names, **kwargs):
    """
    Returns a RQ worker for all queues or specified ones.
    """
    job_class = get_job_class(kwargs.pop('job_class', None))
    queue_class = kwargs.pop('queue_class', None)
    queues = get_queues(*queue_names, **{'job_class': job_class,
                                         'queue_class': queue_class})
    # normalize queue_class to what get_queues returns
    queue_class = queues[0].__class__
    worker_class = get_worker_class(kwargs.pop('worker_class', None))
    return worker_class(queues,
                        connection=queues[0].connection,
                        exception_handlers=get_exception_handlers() or None,
                        job_class=job_class,
                        queue_class=queue_class,
                        **kwargs)
Returns a RQ worker for all queues or specified ones.