'Find a description node matching "name", perhaps using
the given module and/or classname.'

def find_desc(self, modname, classname, name, type, searchorder=0):

    if (name[(-2):] == '()'):
        name = name[:(-2)]
    if (not name):
        return (None, None)
    if ((type[0] == 'c') and (type not in ('class', 'const'))):
        name = name.rstrip('    *')
        if ((name in self.descrefs) and (self.descrefs[name][1][0] == 'c')):
            return (name, self.descrefs[name])
        return (None, None)
    newname = None
    if (searchorder == 1):
        if (modname and classname and (((((modname + '.') + classname) + '.') + name) in self.descrefs)):
            newname = ((((modname + '.') + classname) + '.') + name)
        elif (modname and (((modname + '.') + name) in self.descrefs)):
            newname = ((modname + '.') + name)
        elif (name in self.descrefs):
            newname = name
    elif (name in self.descrefs):
        newname = name
    elif (modname and (((modname + '.') + name) in self.descrefs)):
        newname = ((modname + '.') + name)
    elif (modname and classname and (((((modname + '.') + classname) + '.') + name) in self.descrefs)):
        newname = ((((modname + '.') + classname) + '.') + name)
    elif ((type == 'exc') and ('.' not in name) and (('exceptions.' + name) in self.descrefs)):
        newname = ('exceptions.' + name)
    elif ((type in ('func', 'meth')) and ('.' not in name) and (('object.' + name) in self.descrefs)):
        newname = ('object.' + name)
    if (newname is None):
        return (None, None)
    return (newname, self.descrefs[newname])
