code: def compute_score_tensor_for_cascading(
      chosen_index: types.Int,
      chosen_value: types.Float,
      num_slots: int,
      non_click_score: float = -1.0,
  ) -> types.Float:
      """Gives scores for all items in a batch.
  
      The score of items that are before the chosen index is `-1`, the score of
      the chosen values are given by `chosen_value`. The rest of the items receive
      a score of `0`. TODO(b/206685896): Normalize theses scores or let the user
      selected the negative feedback reward.
  
      Args:
        chosen_index: The index of the slot chosen, or `num_slots` if no slot is
          chosen.
        chosen_value: The value of the chosen item.
        num_slots: The number of slots. The output score vector will have shape
          `[batch_size, num_slots]`.
        non_click_score: (float) The score value for items lying "before" the
          clicked item. If not set, -1 is used. It is recommended (but not enforced)
          to use a negative value.
  
      Returns:
        A tensor of shape `[batch_size, num_slots]`, with scores for every item in
        the recommendation.
      """
      negatives = tf.sequence_mask(
          chosen_index, maxlen=num_slots, dtype=tf.float32
      )
  
      chosen_onehot = tf.one_hot(chosen_index, num_slots)
      diag_value = tf.linalg.diag(chosen_value)
      values = tf.linalg.matmul(diag_value, chosen_onehot)
      return values + non_click_score * negatives
  
imports: import enum
  from typing import Optional, Text
  import tensorflow
  from tf_agents.agents import tf_agent
  from tf_agents.bandits.policies import ranking_policy
  from tf_agents.specs import bandit_spec_utils
  from tf_agents.trajectories import policy_step
  from tf_agents.trajectories import time_step
  from tf_agents.trajectories import trajectory
  from tf_agents.typing import types
  from tf_agents.utils import common
  from tf_agents.utils import eager_utils
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 1 for calling a global function with example usage: compute_score_tensor_for_cascading(chosen_index, chosen_value, num_slots, non_click_score) and returns: unknown