code: def build_slateq_stats(
      policy: Policy, batch
  ) -> Dict[str, TensorType]:
      stats = {
          "q_values": policy._q_values,
          "q_clicked": policy._q_clicked,
          "scores": policy._scores,
          "score_no_click": policy._score_no_click,
          "slate_q_values": policy._slate_q_values,
          "replay_click_q": policy._replay_click_q,
          "bellman_reward": policy._bellman_reward,
          "next_q_values": policy._next_q_values,
          "target": policy._target,
          "next_q_target_slate": policy._next_q_target_slate,
          "next_q_target_max": policy._next_q_target_max,
          "target_clicked": policy._target_clicked,
          "mean_td_error": policy._mean_td_error,
          "q_loss": policy._q_loss,
          "mean_actions": policy._mean_actions,
      }
      return stats
  
imports: import functools
  import logging
  from typing import Dict
  import gymnasium
  import numpy
  from rllib_slate_q.slate_q.slateq_tf_model import SlateQTFModel
  from ray.rllib.algorithms.dqn.dqn_tf_policy import clip_gradients
  from ray.rllib.models.modelv2 import ModelV2
  from ray.rllib.models.tf.tf_action_dist import SlateMultiCategorical
  from ray.rllib.policy.policy import Policy
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.policy.tf_mixins import LearningRateSchedule, TargetNetworkMixin
  from ray.rllib.policy.tf_policy_template import build_tf_policy
  from ray.rllib.utils.framework import try_import_tf
  from ray.rllib.utils.tf_utils import huber_loss
  from ray.rllib.utils.typing import AlgorithmConfigDict, TensorType
label_desc: Use image node_id 3 for calling a global function with example usage: build_slateq_stats(policy, batch) and returns: stats