def make_refnode(builder, fromdocname, todocname, targetid, child, title=None):
 node = nodes.reference('', '', internal=True)
 if (fromdocname == todocname):
  node['refid'] = targetid
 else:
  node['refuri'] = ((builder.get_relative_uri(fromdocname, todocname) + '#') + targetid)
 if title:
  node['reftitle'] = title
 node.append(child)
 return node

def make_refnode ( builder , fromdocname , todocname , targetid , child , title = None ) : node = nodes . reference ( '' , '' , internal = True ) if ( fromdocname == todocname ) : node [ 'refid' ] = targetid else : node [ 'refuri' ] = ( ( builder . get_relative_uri ( fromdocname , todocname ) + '#' ) + targetid ) if title : node [ 'reftitle' ] = title node . append ( child ) return node
shortcut to create a reference node .