code: def _clip_max_trajectory_length(
      max_trajectory_length,
      step_size,
      trajectory_adaptation_rate,
      max_leapfrog_steps,
  ):
      return tf.where(
          trajectory_adaptation_rate > 0,
          tf.clip_by_value(
              max_trajectory_length,
              0.0,
              step_size
              * tf.cast(
                  max_leapfrog_steps, max_trajectory_length.dtype
              ),
          ),
          max_trajectory_length,
      )
  
imports: import collections
  import functools
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import broadcast_util
  from tensorflow_probability.python.internal import distribute_lib
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import unnest
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.mcmc import kernel
  from tensorflow_probability.python.mcmc import simple_step_size_adaptation
  from tensorflow_probability.python.mcmc import transformed_kernel
  from tensorflow_probability.python.mcmc.internal import util
  from tensorflow.python.util import nest
label_desc: Use image node_id 16 for calling a global function with example usage: _clip_max_trajectory_length(max_trajectory_length, step_size, trajectory_adaptation_rate, max_leapfrog_steps) and returns: tf