def __dir__(self):
extras = self._mock_methods or []<EOL>from_type = dir(type(self))<EOL>from_dict = list(self.__dict__)<EOL>if FILTER_DIR:<EOL><INDENT>from_type = [e for e in from_type if not e.startswith('<STR_LIT:_>')]<EOL>from_dict = [e for e in from_dict if not e.startswith('<STR_LIT:_>') or<EOL>_is_magic(e)]<EOL><DEDENT>return sorted(set(extras + from_type + from_dict +<EOL>list(self._mock_children)))<EOL>
Filter the output of `dir(mock)` to only useful members.
        XXXX