def _validate_node(node):
 try:
  if (node is not None):
   node = nodeprep(node)
   if (not node):
    raise InvalidJID(u'Localpart must not be 0 bytes')
   if (len(node) > 1023):
    raise InvalidJID(u'Localpart must be less than 1024 bytes')
   return node
 except stringprep_profiles.StringPrepError:
  raise InvalidJID(u'Invalid local part')

def _validate_node ( node ) : try : if ( node is not None ) : node = nodeprep ( node ) if ( not node ) : raise InvalidJID ( u'Localpart must not be 0 bytes' ) if ( len ( node ) > 1023 ) : raise InvalidJID ( u'Localpart must be less than 1024 bytes' ) return node except stringprep_profiles . StringPrepError : raise InvalidJID ( u'Invalid local part' )
validate the local .