'Get or create consul session.
Try to renew the session if it exists, otherwise create a new
session in Consul.
This session is used to acquire a lock inside Consul so that we achieve
read-consistency between the nodes.
Arguments:
queue (str): The name of the Queue.
Returns:
str: The ID of the session.'

def _get_or_create_session(self, queue):

    try:
        session_id = self.queues[queue][u'session_id']
    except KeyError:
        session_id = None
    return (self._renew_existing_session(session_id) if (session_id is not None) else self._create_new_session())
