def controller_id(vendor_id, product_ids, model_name):
 if (not (type(vendor_id) is int)):
  raise AssertionError
  raise ((type(product_ids) is list) or AssertionError)
  for product_id in product_ids:
   raise ((type(product_id) is int) or AssertionError)
  raise ((type(model_name) is str) or (type(model_name) is list) or AssertionError)
  model_names = ((type(model_name) is str) and [model_name])
 else:
  model_names = model_name
 return {VENDORID: vendor_id, PRODUCTIDS: product_ids, MODEL_NAMES: model_names}

def controller_id ( vendor_id , product_ids , model_name ) : if ( not ( type ( vendor_id ) is int ) ) : raise AssertionError raise ( ( type ( product_ids ) is list ) or AssertionError ) for product_id in product_ids : raise ( ( type ( product_id ) is int ) or AssertionError ) raise ( ( type ( model_name ) is str ) or ( type ( model_name ) is list ) or AssertionError ) model_names = ( ( type ( model_name ) is str ) and [ model_name ] ) else : model_names = model_name return { VENDORID : vendor_id , PRODUCTIDS : product_ids , MODEL_NAMES : model_names }
generate a hardwareid dict .