'Import the object given by *self.modname* and *self.objpath* and sets
it as *self.object*.
Returns True if successful, False if an error occurred.'

def import_object(self):

    try:
        __import__(self.modname)
        obj = self.module = sys.modules[self.modname]
        for part in self.objpath:
            obj = self.get_attr(obj, part)
        self.object = obj
        return True
    except (SyntaxError, ImportError, AttributeError) as err:
        self.directive.warn(('autodoc    can\'t    import/find    %s    %r,    it    reported    error:    "%s",    please    check    your    spelling    and    sys.path' % (self.objtype, str(self.fullname), err)))
        return False
