class_docstr: Tests the Grappler remapper optimizer.
code: def _VerifyValues(
      self, model_fn, use_low_precision, fused_op, epilog_ops
  ):
      run_options = config_pb2.RunOptions(output_partition_graphs=True)
      metadata = config_pb2.RunMetadata()
      # Compute reference value.
      config = _get_config(remapping_on=False)
      with session.Session(config=config) as sess:
          sess.run(variables.global_variables_initializer())
          output_ref = sess.run(
              model_fn, options=run_options, run_metadata=metadata
          )
      # Compute output with fusion.
      config = _get_config(remapping_on=True)
      with session.Session(config=config) as sess:
          sess.run(variables.global_variables_initializer())
          output_val = sess.run(
              model_fn, options=run_options, run_metadata=metadata
          )
          graph = metadata.partition_graphs[0]
  
      # Graph should contain fused op.
      found_fused_op = False
      for node in graph.node:
          if node.op in fused_op:
              fused_ops = node.attr["fused_ops"].list.s
              ops_matched = len(fused_ops) >= 1 and len(
                  fused_ops
              ) == len(epilog_ops)
              for op_a, op_b in zip(fused_ops, epilog_ops):
                  if op_a != op_b:
                      ops_matched = False
                      break
              found_fused_op = ops_matched
              break
      self.assertTrue(found_fused_op)
  
      # Computed output value should be close to reference value.
      tol = 1e-2 if use_low_precision else 1e-5
      self.assertAllClose(output_ref, output_val, atol=tol, rtol=tol)
  
      return graph
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from absl.testing import parameterized
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.core.protobuf import rewriter_config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import meta_graph
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.grappler import tf_optimizer
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import init_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import sysconfig
  from tensorflow.python.platform import test
  from tensorflow.python.util import _pywrap_utils
label_desc: Use image node_id 4 for calling the RemapperTest obj's underlying member method code with example usage: obj._VerifyValues(model_fn, use_low_precision, fused_op, epilog_ops) and returns: graph