def data_to_graph6(data):
 if ((len(data) > 0) and ((min(data) < 0) or (max(data) > 63))):
  raise NetworkXError('graph6 data units must be within 0..63')
 return ''.join([chr((d + 63)) for d in data])

def data_to_graph6 ( data ) : if ( ( len ( data ) > 0 ) and ( ( min ( data ) < 0 ) or ( max ( data ) > 63 ) ) ) : raise NetworkXError ( 'graph6 data units must be within 0..63' ) return '' . join ( [ chr ( ( d + 63 ) ) for d in data ] )
convert 6-bit integer sequence to graph6 character sequence .