code: def _grappler_enabled_session_config():
      """Constructs a Session config proto that explicitly enables Grappler.
  
      Returns:
        A config proto that obtains extra safety for the unit tests in this
        file by ensuring that the relevant Grappler rewrites are always enabled.
      """
      rewriter_config = rewriter_config_pb2.RewriterConfig(
          disable_model_pruning=False,
          arithmetic_optimization=rewriter_config_pb2.RewriterConfig.ON,
      )
      graph_options = config_pb2.GraphOptions(
          rewrite_options=rewriter_config
      )
      return config_pb2.ConfigProto(graph_options=graph_options)
  
imports: import os
  import tempfile
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.core.protobuf import rewriter_config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.debug.lib import debug_data
  from tensorflow.python.debug.lib import debug_utils
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variable_v1
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 1 for calling a global function with example usage: _grappler_enabled_session_config() and returns: config_pb2