code: def check_uniqueness(self, *args, **kwargs):
          
  
          if not self.field.unique:
              return
  
          key = kwargs.get('key', None)
          if key is None:
              key = self.get_storage_key(*args)
  
          # Lets check if the index key already exist for another instance
          pk = self.instance.pk.get()
          pks = list(self.connection.smembers(key))
  
          self.assert_pks_uniqueness(pks, pk, list(args)[-1])
docs: Check if the given "value" (via `args`) is unique or not.
  
          Parameters
          ----------
          kwargs: dict
              key: str
                  When given, it will be used instead of calling ``get_storage_key``
                  for the given args
                  MUST be passed as a keyword argument
  
          For the other parameters, see ``BaseIndex.check_uniqueness``