class_docstr: Stationary Stochastic Bandit environment with per-arm features.
class_docstr_tok: ["Stationary","Stochastic","Bandit","environment","with","per-arm","features","."]
code: def _choose_items_distance_based(self, global_obs, slotted_items):
      scores = self._batched_inner_product(global_obs, slotted_items)
      scores = np.concatenate(
          [
              scores,
              np.ones([self._batch_size, 1]) * self._distance_threshold,
          ],
          axis=1,
      )
      if self._real_cascade:
          return np.array(
              [
                  np.min(np.where(s >= self._distance_threshold))
                  for s in scores
              ]
          )
      return np.argmax(scores, axis=1)
  
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 10 for calling the RankingPyEnvironment obj's underlying member method code with example usage: obj._choose_items_distance_based(global_obs, slotted_items) and returns: np, np