def METHOD_NAME(self, obj, memo=None):
    '''
    traverse all attributes of an object looking
    for subObjects that meet a certain criteria.
    yield them.
    `memo` is a dictionary to keep track of objects
    that have already been seen
    The original object is added to the memo and
    also checked for yieldValue
    '''
    if memo is None:
        memo = {}
    self.memo = memo
    if id(obj) in self.memo:
        self.memo[id(obj)] += 1
        return
    else:
        self.memo[id(obj)] = 1
    if self.yieldValue(obj) is True:
        yield obj
    # now check for sub values...
    self.currentStack.append(obj)
    tObj = type(obj)
    if tObj in self.nonIterables:
        pass
    elif tObj == dict:
        for keyX in obj:
            dictTuple = ('dict', keyX)
            self.stackVals.append(dictTuple)
            x = obj[keyX]
            for z in self.METHOD_NAME(x, memo=memo):
                yield z
            self.stackVals.pop()
    elif tObj in [list, tuple]:
        for i, x in enumerate(obj):
            listTuple = ('listLike', i)
            self.stackVals.append(listTuple)
            for z in self.METHOD_NAME(x, memo=memo):
                yield z
            self.stackVals.pop()
    else:  # objects or uncaught types...
        # from http://bugs.python.org/file18699/static.py
        try:
            instance_dict = object.__getattribute__(obj, '__dict__')
        except AttributeError:
            # probably uncaught static object
            return
        for x in instance_dict:
            # noinspection PyBroadException
            try:
                gotValue = object.__getattribute__(obj, x)
            except Exception:  # pylint: disable=broad-exception-caught
                continue
            objTuple = ('getattr', x)
            self.stackVals.append(objTuple)
            try:
                for z in self.METHOD_NAME(gotValue, memo=memo):
                    yield z
            except RuntimeError:
                raise ValueError(f'Maximum recursion on:\n{self.currentLevel()}')
            self.stackVals.pop()
    self.currentStack.pop()