def parameter_banks(device, device_dict=DEVICE_DICT):
 if (device != None):
  if (device.class_name in device_dict.keys()):
   def names_to_params(bank):
    return map(partial(get_parameter_by_name, device), bank)
   return map(names_to_params, device_dict[device.class_name])
  else:
   if (device.class_name in MAX_DEVICES):
    try:
     banks = device.get_bank_count()
    except:
     banks = 0
    if (banks != 0):
     def _bank_parameters(bank_index):
      try:
       parameter_indices = device.get_bank_parameters(bank_index)
      except:
       parameter_indices = []
      if (len(parameter_indices) != 8):
       return [None for i in range(0, 8)]
      else:
       return [(device.parameters[i] if (i != (-1)) else None) for i in parameter_indices]
     return map(_bank_parameters, range(0, banks))
   return group(device_parameters_to_map(device), 8)
 return []

def parameter_banks ( device , device_dict = DEVICE_DICT ) : if ( device != None ) : if ( device . class_name in device_dict . keys ( ) ) : def names_to_params ( bank ) : return map ( partial ( get_parameter_by_name , device ) , bank ) return map ( names_to_params , device_dict [ device . class_name ] ) else : if ( device . class_name in MAX_DEVICES ) : try : banks = device . get_bank_count ( ) except : banks = 0 if ( banks != 0 ) : def _bank_parameters ( bank_index ) : try : parameter_indices = device . get_bank_parameters ( bank_index ) except : parameter_indices = [ ] if ( len ( parameter_indices ) != 8 ) : return [ None for i in range ( 0 , 8 ) ] else : return [ ( device . parameters [ i ] if ( i != ( - 1 ) ) else None ) for i in parameter_indices ] return map ( _bank_parameters , range ( 0 , banks ) ) return group ( device_parameters_to_map ( device ) , 8 ) return [ ]
determine the parameters to use for a device .