def includes_cls(fields):
 first_field = None
 if len(fields):
  if isinstance(fields[0], six.string_types):
   first_field = fields[0]
  elif (isinstance(fields[0], (list, tuple)) and len(fields[0])):
   first_field = fields[0][0]
 return (first_field == '_cls')

def includes_cls ( fields ) : first_field = None if len ( fields ) : if isinstance ( fields [ 0 ] , six . string_types ) : first_field = fields [ 0 ] elif ( isinstance ( fields [ 0 ] , ( list , tuple ) ) and len ( fields [ 0 ] ) ) : first_field = fields [ 0 ] [ 0 ] return ( first_field == '_cls' )
helper function used for ensuring and comparing indexes .