Used by values and values_list to get the list of fields to use in the
        redis sort command to retrieve fields.
        The result is a dict with two lists:
          - 'names', with wanted field names
          - 'keys', with keys to use in the sort command
        When sorting by score, we allow to retrieve the score in values/values_list.
        For this, just pass SORTED_SCORE (importable from contrib.collection) as
        a name to retrieve.
        If finally the result is not sorted by score, the value for this part
        will be None

def _coerce_fields_parameters(self, fields):
        """
        Used by values and values_list to get the list of fields to use in the
        redis sort command to retrieve fields.
        The result is a dict with two lists:
          - 'names', with wanted field names
          - 'keys', with keys to use in the sort command
        When sorting by score, we allow to retrieve the score in values/values_list.
        For this, just pass SORTED_SCORE (importable from contrib.collection) as
        a name to retrieve.
        If finally the result is not sorted by score, the value for this part
        will be None
        """
        try:
            sorted_score_pos = fields.index(SORTED_SCORE)
        except:
            sorted_score_pos = None
        else:
            fields = list(fields)
            fields.pop(sorted_score_pos)

        final_fields = {'names': [], 'keys': []}
        for field_name in fields:
            if self._field_is_pk(field_name):
                final_fields['names'].append(field_name)
                final_fields['keys'].append('#')
            else:
                if not self.cls.has_field(field_name):
                    raise ValueError("%s if not a valid field to get from collection"
                                     " for %s" % (field_name, self.cls.__name__))
                field = self.cls.get_field(field_name)
                if isinstance(field, MultiValuesField):
                    raise ValueError("It's not possible to get a MultiValuesField"
                                     " from a collection (asked: %s" % field_name)
                final_fields['names'].append(field_name)
                final_fields['keys'].append(field.sort_wildcard)

        if sorted_score_pos is not None:
            final_fields['names'].insert(sorted_score_pos, SORTED_SCORE)
            final_fields['keys'].insert(sorted_score_pos, SORTED_SCORE)

        return final_fields