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