An internal function to generate lookup iterators.

def _lookupIterator(self, val):
        """ An internal function to generate lookup iterators.
        """
        if val is None:
            return lambda el, *args: el
        return val if _.isCallable(val) else lambda obj, *args: obj[val]