code: def srem(self, key, *values):
          
          redis_set = self._get_set(key, 'SREM')
          if not redis_set:
              return 0
          before_count = len(redis_set)
          for value in values:
              redis_set.discard(self._encode(value))
          after_count = len(redis_set)
          if before_count > 0 and len(redis_set) == 0:
              self.delete(key)
          return before_count - after_count
docs: Emulate srem.