'Given a handler ID or tag, return a handler matching it.
:param id_or_tag: A handler ID or tag.
:type id_or_tag: str
:param index: Generate "consistent" "random" handlers with this index if specified.
:type index: int
:returns: str -- A valid job handler ID.'

def get_handler(self, id_or_tag, index=None):

    if (id_or_tag is None):
        id_or_tag = self.default_handler_id
    return self._get_single_item(self.handlers[id_or_tag], index=index)
