class_docstr: A ranking environment in which one can explicitly set positional bias.
  
  This environment assumes that the user's click is governed by two independent
  values: the relevance and the observation probability. Relevance is based on
  a random function whose input is the global and item features. The observation
  probability is a parameter list that sets observation probabilities for all of
  the slot positions. The observation prbabilities don't denpend on the context
  or the items placed in the slots.
  
  The user model: an item is clicked if it is observed and relevant. Hence,
  multiple items can be clicked in one sample.
class_docstr_tok: ["A","ranking","environment","in","which","one","can","explicitly","set","positional","bias",".","This","environment","assumes","that","the","user","'s","click","is","governed","by","two","independent","values",":","the","relevance","and","the","observation","probability",".","Relevance","is","based","on","a","random","function","whose","input","is","the","global","and","item","features",".","The","observation","probability","is","a","parameter","list","that","sets","observation","probabilities","for","all","of","the","slot","positions",".","The","observation","prbabilities","do","n't","denpend","on","the","context","or","the","items","placed","in","the","slots",".","The","user","model",":","an","item","is","clicked","if","it","is","observed","and","relevant",".","Hence",",","multiple","items","can","be","clicked","in","one","sample","."]
docstr: Returns the relevance of each item in a batched action.
docstr_tok: ["Returns","the","relevance","of","each","item","in","a","batched","action","."]
code: def _get_relevances(self, global_obs, slotted_items):
      """Returns the relevance of each item in a batched action."""
      s_range = range(self._num_slots)
      b_range = range(self._batch_size)
  
      relevances = np.array(
          [
              [
                  self._relevance_fn(global_obs[i], slotted_items[i, j])
                  for j in s_range
              ]
              for i in b_range
          ]
      )
      clipped_relevances = np.clip(relevances, 0.0, 1.0)
      if not np.all(relevances == clipped_relevances):
          print("Warning: relevance probabilities outside of `[0, 1]`.")
      return clipped_relevances
  
imports: from typing import Callable, Optional, Sequence, Text
  import numpy
  import tensorflow
  from tf_agents.bandits.environments import bandit_py_environment
  from tf_agents.bandits.specs import utils
  from tf_agents.specs import array_spec
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
label_desc: Use image node_id 4 for calling the ExplicitPositionalBiasRankingEnvironment obj's underlying member method code with example usage: obj._get_relevances(global_obs, slotted_items) and returns: clipped_relevances