code: def process_args(
      target_fn,
      momentum_parts,
      state_parts,
      target=None,
      target_grad_parts=None,
  ):
      """Sanitize inputs to `__call__`."""
      with tf.name_scope("process_args"):
          momentum_parts = [
              tf.convert_to_tensor(
                  v, dtype_hint=tf.float32, name="momentum_parts"
              )
              for v in momentum_parts
          ]
          state_parts = [
              tf.convert_to_tensor(
                  v, dtype_hint=tf.float32, name="state_parts"
              )
              for v in state_parts
          ]
          if target is None or target_grad_parts is None:
              [
                  target,
                  target_grad_parts,
              ] = mcmc_util.maybe_call_fn_and_grads(
                  target_fn, state_parts
              )
          else:
              target = tf.convert_to_tensor(
                  target, dtype_hint=tf.float32, name="target"
              )
              target_grad_parts = [
                  tf.convert_to_tensor(
                      g, dtype_hint=tf.float32, name="target_grad_part"
                  )
                  for g in target_grad_parts
              ]
          return momentum_parts, state_parts, target, target_grad_parts
  
file_path: probability/tensorflow_probability/python/mcmc/internal/leapfrog_integrator.py
imports: import abc
  import six
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.mcmc.internal import util
label_desc: Use image node_id 2 for calling a global function with example usage: process_args(target_fn, momentum_parts, state_parts, target, target_grad_parts) and returns: momentum_parts,  state_parts,  target,  target_grad_parts