code: def _set_swapped_fields_to_nan(replica_results):
      """Get new replica results, with some fields set to NaN.
  
      It is unclear what values some fields should take after swapping. For these
      values, we set them to NaN.
  
      Args:
        replica_results: Replica results, before swapping.
  
      Returns:
        Copy of replica_results, with some fields set to NaN.
      """
      dtype = _get_field(replica_results, "target_log_prob").dtype
      nan = tf.convert_to_tensor(
          np.nan, name="intentional_nan", dtype=dtype
      )
  
      for field in ["proposed_results", "proposed_state"]:
          replica_results = _update_field(replica_results, field, nan)
  
      return replica_results
  
imports: import collections
  import warnings
  import numpy
  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 distribution_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import unnest
  from tensorflow_probability.python.mcmc import kernel
  from tensorflow_probability.python.mcmc.internal import util
label_desc: Use image node_id 6 for calling a global function with example usage: _set_swapped_fields_to_nan(replica_results) and returns: replica_results