code: def hmc_like_num_leapfrog_steps_setter_fn(
      kernel_results, new_num_leapfrog_steps
  ):
      """Setter for `num_leapfrog_steps` so it can be adapted."""
      return unnest.replace_innermost(
          kernel_results, num_leapfrog_steps=new_num_leapfrog_steps
      )
  
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 4 for calling a global function with example usage: hmc_like_num_leapfrog_steps_setter_fn(kernel_results, new_num_leapfrog_steps) and returns: unnest