code: def get_pks_for_filter(self, key, filter_type, value):
          
          start, end, exclude = self.get_boundaries(filter_type, value)
          members = self.connection.zrangebylex(key, start, end)
          if exclude is not None:
              # special case where we don't want the exact given value, but we cannot
              # exclude it from the sorted set directly
              return [
                  member_pk
                  for member_value, member_pk in
                  [self._extract_value_from_storage(member) for member in members]
                  if member_value != exclude
              ]
          else:
              return [self._extract_value_from_storage(member)[-1] for member in members]
docs: Extract the pks from the zset key for the given type and value
  
          For the parameters, see BaseRangeIndex.get_pks_for_filter