class_docstr: A distribution that samples permutations and penalizes item scores.
  
  This distribution samples elements of a permutation incrementally, and after
  every sample it penalizes the scores of the remaining items by the similarity
  of already chosen items.
docstr: Downscores items by their similarity to already selected items.
  
  Args:
    logits: The current logits of all items.
    features: the feature vectors of the items.
    slots: list of indices of already selected items.
  
  Returns:
    New logits.
docstr_tok: ["Downscores","items","by","their","similarity","to","already","selected","items",".","Args",":","logits",":","The","current","logits","of","all","items",".","features",":","the","feature","vectors","of","the","items",".","slots",":","list","of","indices","of","already","selected","items",".","Returns",":","New","logits","."]
code: def _penalizer_fn(
      self,
      logits: types.Float,
      features: types.Float,
      slots: Sequence[types.Int],
  ):
      """Downscores items by their similarity to already selected items.
  
      Args:
        logits: The current logits of all items.
        features: the feature vectors of the items.
        slots: list of indices of already selected items.
  
      Returns:
        New logits.
      """
      raise NotImplementedError()
  
imports: from typing import Optional, Sequence, Text
  import numpy
  import tensorflow
  import tensorflow_probability
  from tf_agents.policies import tf_policy
  from tf_agents.policies import utils
  from tf_agents.specs import bandit_spec_utils
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import policy_step
  from tf_agents.typing import types
label_desc: Use image node_id 2 for calling the PenalizedPlackettLuce obj's underlying member method code with example usage: obj._penalizer_fn(logits, features, slots) without return types