code: def compare_params(self, p1, p2, skip_tensor_values=False):
      if tf.is_tensor(p1):
          # When comparing tensors, just make sure both items are tensor-like.  This
          # allows us to consider, e.g., tf.Variable and tf.Tensor equivalent.
          self.assertTrue(tf.is_tensor(p2))
      else:
          self.assertFalse(tf.is_tensor(p2))
          self.assertEqual(type(p1), type(p2))
      if isinstance(p1, utils.Params):
          self.assertEqual(p1.type_, p2.type_)
          tf.nest.map_structure(
              lambda p1_, p2_: self.compare_params(
                  p1_, p2_, skip_tensor_values
              ),
              p1.params,
              p2.params,
          )
      elif tf.is_tensor(p1):
          if not skip_tensor_values:
              self.assertAllEqual(p1, p2)
      else:
          self.assertEqual(p1, p2)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  import tensorflow_probability
  from tf_agents.distributions import utils
  from tf_agents.specs import tensor_spec
label_desc: Use image node_id 4 for calling the UtilsTest obj's underlying member method code with example usage: obj.compare_params(p1, p2, skip_tensor_values) without return types