def _nameToLabels(name):
 if (name in ('', '.')):
  return ['']
 labels = name.split('.')
 if (labels[(-1)] != ''):
  labels.append('')
 return labels

def _nameToLabels ( name ) : if ( name in ( '' , '.' ) ) : return [ '' ] labels = name . split ( '.' ) if ( labels [ ( - 1 ) ] != '' ) : labels . append ( '' ) return labels
split a domain name into its constituent labels .