code: def filter_connection_params(queue_params):
      
      CONNECTION_PARAMS = ('URL', 'DB', 'USE_REDIS_CACHE',
                           'UNIX_SOCKET_PATH', 'HOST', 'PORT', 'PASSWORD',
                           'SENTINELS', 'MASTER_NAME', 'SOCKET_TIMEOUT',
                           'SSL', 'CONNECTION_KWARGS',)
  
      #return {p:v for p,v in queue_params.items() if p in CONNECTION_PARAMS}
      # Dict comprehension compatible with python 2.6
      return dict((p,v) for (p,v) in queue_params.items() if p in CONNECTION_PARAMS)
docs: Filters the queue params to keep only the connection related params.