':params bool attribute_lookup: Tell to logic if we\'re accessing the
attribute or the contents of e.g. a function.'

@debug.increase_indent
def find(self, filters, attribute_lookup):

    names = self.filter_name(filters)
    if ((self._found_predefined_types is not None) and names):
        check = flow_analysis.reachability_check(self._context, self._context.tree_node, self._name)
        if (check is flow_analysis.UNREACHABLE):
            return set()
        return self._found_predefined_types
    types = self._names_to_types(names, attribute_lookup)
    if ((not names) and (not types) and (not (isinstance(self._name, tree.Name) and isinstance(self._name.parent.parent, tree.Param)))):
        if isinstance(self._name, tree.Name):
            if attribute_lookup:
                analysis.add_attribute_error(self._name_context, self._context, self._name)
            else:
                message = ("NameError:    name    '%s'    is    not    defined." % self._string_name)
                analysis.add(self._name_context, 'name-error', self._name, message)
    return types
