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.
code: def _sample_n(self, n, seed=None):
      logits = tf.convert_to_tensor(self.scores)
      sample_shape = tf.concat([[n], tf.shape(logits)], axis=0)
      slots = []
      for _ in range(self._num_slots):
          items = tfd.Categorical(logits=logits).sample()
          slots.append(items)
          logits -= tf.one_hot(items, sample_shape[-1], on_value=np.inf)
          logits = self._penalizer_fn(logits, self._features, slots)
      sample = tf.expand_dims(tf.stack(slots, axis=-1), axis=0)
      return sample
  
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 3 for calling the PenalizedPlackettLuce obj's underlying member method code with example usage: obj._sample_n(n, seed) and returns: sample