code: def _check_failure(population_values):
      """Checks if all the population values are NaN/infinite."""
      return tf.math.reduce_all(tf.math.is_inf(population_values))
  
imports: import collections
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.util import seed_stream
label_desc: Use image node_id 4 for calling a global function with example usage: _check_failure(population_values) and returns: tf