code: def _default_energy_change_fn(
      old_int_state: fun_mc.IntegratorState,
      new_int_state: fun_mc.IntegratorState,
      kinetic_energy_fn: Optional[fun_mc.PotentialFn],
  ) -> Tuple[fun_mc.FloatArray, Tuple[Any, Any]]:
      """Default energy change function."""
      (
          old_kinetic_energy,
          old_kinetic_energy_extra,
      ) = fun_mc.call_potential_fn(
          kinetic_energy_fn, old_int_state.momentum
      )
      (
          new_kinetic_energy,
          new_kinetic_energy_extra,
      ) = fun_mc.call_potential_fn(
          kinetic_energy_fn, new_int_state.momentum
      )
  
      old_energy = -old_int_state.target_log_prob + old_kinetic_energy
      new_energy = -new_int_state.target_log_prob + new_kinetic_energy
  
      return new_energy - old_energy, (
          old_kinetic_energy_extra,
          new_kinetic_energy_extra,
      )
  
file_path: probability/spinoffs/fun_mc/fun_mc/malt.py
imports: import functools
  from typing import Any, Callable, NamedTuple, Optional, Tuple
  from fun_mc import backend
  from fun_mc import fun_mc_lib
label_desc: Use image node_id 2 for calling a global function with example usage: _default_energy_change_fn(old_int_state, new_int_state, kinetic_energy_fn) and returns: unknown,  old_kinetic_energy_extra,  new_kinetic_energy_extra