def METHOD_NAME(self, raw_query):
    if not raw_query:
        return
    formatted_params = ()
    params = raw_query[1]
    for param in params:
        formatted_param = param
        if (
                isinstance(param, str) or
                isinstance(param, int) or
                isinstance(param, date) or
                param == 'BioBaseData'
        ):
            formatted_param = '\'' + str(param) + '\''
        elif isinstance(param, list):
            formatted_param = str(param)
            formatted_param = formatted_param.replace('[u\'', '\'{"')
            formatted_param = formatted_param.replace('\',', '",')
            formatted_param = formatted_param.replace(' u\'', ' "')
            formatted_param = formatted_param.replace('\']', '"}\'')
        formatted_params += (formatted_param, )
    query_string = raw_query[0] % formatted_params
    self.search_raw_query = query_string
    self.save()