code: def get_config():
      rewrite_options = rewriter_config_pb2.RewriterConfig(
          layout_optimizer=rewriter_config_pb2.RewriterConfig.OFF
      )
      graph_options = config_pb2.GraphOptions(
          rewrite_options=rewrite_options, build_cost_model=1
      )
      config = config_pb2.ConfigProto(graph_options=graph_options)
      return config
  
file_path: NiftyNet/tests/channel_sparse_convolution_test.py
imports: from __future__ import absolute_import, print_function
  import tensorflow
  import numpy
  from niftynet.layer.channel_sparse_convolution import ChannelSparseConvolutionalLayer
  from tests.niftynet_testcase import NiftyNetTestCase
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.core.protobuf import rewriter_config_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: get_config() and returns: config