def METHOD_NAME(self):
    """ Get the Trait object.
    Notes
    -----
    Code adapted from autodoc.Documenter.import_object.
    """
    try:
        current = self.module = import_module(self.modname)
        for part in self.objpath[:-1]:
            current = self.get_attr(current, part)
        name = self.objpath[-1]
        self.object_name = name
        self.object = None
        self.parent = current
        return True
    # this used to only catch SyntaxError, ImportError and
    # AttributeError, but importing modules with side effects can raise
    # all kinds of errors.
    except Exception as err:
        if self.env.app and not self.env.app.quiet:
            self.env.app.info(traceback.format_exc().rstrip())
        msg = (
            "autodoc can't import/find {0} {r1}, it reported error: "
            '"{2}", please check your spelling and sys.path'
        )
        self.directive.warn(
            msg.format(self.objtype, str(self.fullname), err)
        )
        self.env.note_reread()
        return False