'Transform a Python signature into RST nodes.
Return (fully qualified name of the thing, classname if any).
If inside a class, the current class name is handled intelligently:
* it is stripped from the displayed name if present
* it is added to the full name (return value) if not present'

def handle_signature(self, sig, signode):

    name_prefix = None
    name = sig
    arglist = None
    retann = None
    modname = self.options.get('module', self.env.temp_data.get('py:module'))
    classname = self.env.temp_data.get('py:class')
    fullname = name
    signode['module'] = modname
    signode['class'] = classname
    signode['fullname'] = fullname
    sig_prefix = self.get_signature_prefix(sig)
    if sig_prefix:
        signode += addnodes.desc_annotation(sig_prefix, sig_prefix)
    if name_prefix:
        signode += addnodes.desc_addname(name_prefix, name_prefix)
    anno = self.options.get('annotation')
    signode += addnodes.desc_name(name, name)
    if (not arglist):
        if self.needs_arglist():
            signode += addnodes.desc_parameterlist()
        if retann:
            signode += addnodes.desc_returns(retann, retann)
        if anno:
            signode += addnodes.desc_annotation(('    ' + anno), ('    ' + anno))
        return (fullname, name_prefix)
    _pseudo_parse_arglist(signode, arglist)
    if retann:
        signode += addnodes.desc_returns(retann, retann)
    if anno:
        signode += addnodes.desc_annotation(('    ' + anno), ('    ' + anno))
    return (fullname, name_prefix)
