def get_index_key_from_params(params):
 if ((len(params) != 5) and (len(params) != 4)):
  raise ValueError('Bad number of params')
 if (params[(-1)] is None):
  key = (dbconstants.KEY_DELIMITER.join(params[:(-1)]) + dbconstants.KEY_DELIMITER)
 else:
  key = dbconstants.KEY_DELIMITER.join(params)
 return key

def get_index_key_from_params ( params ) : if ( ( len ( params ) != 5 ) and ( len ( params ) != 4 ) ) : raise ValueError ( 'Bad number of params' ) if ( params [ ( - 1 ) ] is None ) : key = ( dbconstants . KEY_DELIMITER . join ( params [ : ( - 1 ) ] ) + dbconstants . KEY_DELIMITER ) else : key = dbconstants . KEY_DELIMITER . join ( params ) return key
returns the index key from params .