'Translates an integer, set or list into a lambda that checks a state address against the given addresses, and the
other ones from the same basic block
:param condition:   An integer, set, or list to convert to a lambda.
:param default:     The default return value of the lambda (in case condition is None). Default: false.
:returns:           A lambda that takes a state and returns the set of addresses that it matched from the condition'

def _condition_to_lambda(self, condition, default=False):

    if (condition is None):
        condition_function = (lambda p: default)
    elif isinstance(condition, (int, long)):
        return self._condition_to_lambda((condition,))
    elif isinstance(condition, (tuple, set, list)):
        addrs = set(condition)
        def condition_function(p):
            if (p.addr in addrs):
                return {p.addr}
            try:
                return addrs.intersection(set(self.project.factory.block(p.addr).instruction_addrs))
            except (AngrError, SimError):
                return False
    elif hasattr(condition, '__call__'):
        condition_function = condition
    else:
        raise AngrExplorationTechniqueError(('ExplorationTechnique    is    unable    to    convert    given    type    (%s)    to    a    callable    condition    function.' % condition.__class__))
    return condition_function
