code: def move_dimensions(xs, source, dest):
      if tf.nest.is_nested(xs):
          if not tf.nest.is_nested(source):
              source = tf.nest.map_structure(lambda _: source, xs)
          if not tf.nest.is_nested(dest):
              dest = tf.nest.map_structure(lambda _: dest, xs)
      return tf.nest.map_structure(
          distribution_util.move_dimension, xs, source, dest
      )
  
imports: import functools
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import log_prob_ratio
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.math import generic
label_desc: Use image node_id 4 for calling a global function with example usage: move_dimensions(xs, source, dest) and returns: tf