def _unescape_node(node):
 unescaped = []
 seq = u''
 for (i, char) in enumerate(node):
  if (char == u'\\'):
   seq = node[i:(i + 3)]
   if (seq not in JID_ESCAPE_SEQUENCES):
    seq = u''
  if seq:
   if (len(seq) == 3):
    unescaped.append(JID_UNESCAPE_TRANSFORMATIONS.get(seq, char))
   seq = seq[1:]
  else:
   unescaped.append(char)
 unescaped = u''.join(unescaped)
 return unescaped

def _unescape_node ( node ) : unescaped = [ ] seq = u'' for ( i , char ) in enumerate ( node ) : if ( char == u'\\' ) : seq = node [ i : ( i + 3 ) ] if ( seq not in JID_ESCAPE_SEQUENCES ) : seq = u'' if seq : if ( len ( seq ) == 3 ) : unescaped . append ( JID_UNESCAPE_TRANSFORMATIONS . get ( seq , char ) ) seq = seq [ 1 : ] else : unescaped . append ( char ) unescaped = u'' . join ( unescaped ) return unescaped
unescape a local portion of a jid .