def cinder_import_alphabetical(physical_line, line_number, lines):
 split_line = import_normalize(physical_line.strip()).lower().split()
 split_previous = import_normalize(lines[(line_number - 2)]).strip().lower().split()
 length = [2, 4]
 if ((len(split_line) in length) and (len(split_previous) in length) and (split_line[0] == 'import') and (split_previous[0] == 'import')):
  if (split_line[1] < split_previous[1]):
   return (0, ('CINDER N306: imports not in alphabetical order (%s, %s)' % (split_previous[1], split_line[1])))

def cinder_import_alphabetical ( physical_line , line_number , lines ) : split_line = import_normalize ( physical_line . strip ( ) ) . lower ( ) . split ( ) split_previous = import_normalize ( lines [ ( line_number - 2 ) ] ) . strip ( ) . lower ( ) . split ( ) length = [ 2 , 4 ] if ( ( len ( split_line ) in length ) and ( len ( split_previous ) in length ) and ( split_line [ 0 ] == 'import' ) and ( split_previous [ 0 ] == 'import' ) ) : if ( split_line [ 1 ] < split_previous [ 1 ] ) : return ( 0 , ( 'CINDER N306: imports not in alphabetical order (%s, %s)' % ( split_previous [ 1 ] , split_line [ 1 ] ) ) )
check for imports in alphabetical order .