def lowest_pending_jobs(backends):
    """Returns the backend with lowest pending jobs."""
    backends = filter(lambda x: x.status.get('available', False), backends)
    by_pending_jobs = sorted(backends,
                             key=lambda x: x.status['pending_jobs'])
    return by_pending_jobs[0]