def select_array_wrapper(inputs):
 max_prio = float('-inf')
 selected_input = None
 selected_index = None
 for (index, ty) in enumerate(inputs):
  if (isinstance(ty, types.ArrayCompatible) and (ty.array_priority > max_prio)):
   selected_input = ty
   selected_index = index
   max_prio = ty.array_priority
 assert (selected_index is not None)
 return selected_index

def select_array_wrapper ( inputs ) : max_prio = float ( '-inf' ) selected_input = None selected_index = None for ( index , ty ) in enumerate ( inputs ) : if ( isinstance ( ty , types . ArrayCompatible ) and ( ty . array_priority > max_prio ) ) : selected_input = ty selected_index = index max_prio = ty . array_priority assert ( selected_index is not None ) return selected_index
given the array-compatible input types to an operation .