code: def _repeat_tensor(t: TensorType, n: int):
      # Insert new axis at position 1 into tensor t
      t_rep = tf.expand_dims(t, 1)
      # Repeat tensor t_rep along new axis n times
      multiples = tf.concat(
          [[1, n], tf.tile([1], tf.expand_dims(tf.rank(t) - 1, 0))], 0
      )
      t_rep = tf.tile(t_rep, multiples)
      # Merge new axis into batch axis
      t_rep = tf.reshape(t_rep, tf.concat([[-1], tf.shape(t)[1:]], 0))
      return t_rep
  
imports: from functools import partial
  import numpy
  import gymnasium
  import logging
  import tree
  from typing import Dict, List, Type, Union
  import ray
  import ray.experimental.tf_utils
  from ray.rllib.algorithms.sac.sac_tf_policy import apply_gradients, compute_and_clip_gradients, get_distribution_inputs_and_class, _get_dist_class, build_sac_model, postprocess_trajectory, setup_late_mixins, stats, validate_spaces, ActorCriticOptimizerMixin, ComputeTDErrorMixin
  from ray.rllib.models.modelv2 import ModelV2
  from ray.rllib.models.tf.tf_action_dist import TFActionDistribution
  from ray.rllib.policy.tf_mixins import TargetNetworkMixin
  from ray.rllib.policy.tf_policy_template import build_tf_policy
  from ray.rllib.policy.policy import Policy
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.utils.exploration.random import Random
  from ray.rllib.utils.framework import get_variable, try_import_tf, try_import_tfp
  from ray.rllib.utils.typing import LocalOptimizer, ModelGradients, TensorType, AlgorithmConfigDict
label_desc: Use image node_id 1 for calling a global function with example usage: _repeat_tensor(t, n) and returns: t_rep