code: def test_create_num_parameters_metric_fn_with_tower(self):
      # Force graph mode
      with tf.compat.v1.Graph().as_default():
          _ = tf.compat.v1.get_variable(
              name="Phoenix/name",
              shape=[10, 2],
              dtype=tf.float32,
              trainable=True,
          )
          _ = tf.compat.v1.get_variable(
              name="b", shape=[2], dtype=tf.float32, trainable=True
          )
  
          metric_fn = metric_fns.create_num_parameters_metric_fn("name")
          metrics_dict = metric_fn(None, None)
          with self.test_session() as sess:
              self.assertEqual(
                  20, sess.run(metrics_dict["num_parameters"][1])
              )
  
file_path: model_search/model_search/metric_fns_test.py
imports: from absl.testing import parameterized
  from model_search import metric_fns
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 5 for calling the MetricFnsTest obj's underlying member method code with example usage: obj.test_create_num_parameters_metric_fn_with_tower() without return types