def number_of_parameter_banks(device, device_dict=DEVICE_DICT):
 if (device != None):
  if (device.class_name in device_dict.keys()):
   device_bank = device_dict[device.class_name]
   return len(device_bank)
  else:
   if (device.class_name in MAX_DEVICES):
    try:
     banks = device.get_bank_count()
    except:
     banks = 0
    if (banks != 0):
     return banks
   param_count = len(device.parameters[1:])
   return ((param_count / 8) + (1 if (param_count % 8) else 0))
 return 0

def number_of_parameter_banks ( device , device_dict = DEVICE_DICT ) : if ( device != None ) : if ( device . class_name in device_dict . keys ( ) ) : device_bank = device_dict [ device . class_name ] return len ( device_bank ) else : if ( device . class_name in MAX_DEVICES ) : try : banks = device . get_bank_count ( ) except : banks = 0 if ( banks != 0 ) : return banks param_count = len ( device . parameters [ 1 : ] ) return ( ( param_count / 8 ) + ( 1 if ( param_count % 8 ) else 0 ) ) return 0
determine the amount of parameter banks the given device has .