def __is_exported(self, name, module):
if hasattr(self.module, '<STR_LIT>'):<EOL><INDENT>return name in self.module.__all__<EOL><DEDENT>if not _is_exported(name):<EOL><INDENT>return False<EOL><DEDENT>if module is None:<EOL><INDENT>return False<EOL><DEDENT>if module is not None and self.module.__name__ != module.__name__:<EOL><INDENT>return name in self._declared_variables<EOL><DEDENT>return True<EOL>
Returns `True` if and only if `pydoc` considers `name` to be
a public identifier for this module where `name` was defined
in the Python module `module`.

If this module has an `__all__` attribute, then `name` is
considered to be exported if and only if it is a member of
this module's `__all__` list.

If `__all__` is not set, then whether `name` is exported or
not is heuristically determined. Firstly, if `name` starts
with an underscore, it will not be considered exported.
Secondly, if `name` was defined in a module other than this
one, it will not be considered exported. In all other cases,
`name` will be considered exported.