def METHOD_NAME(proto):
  """Disables grappler for `PartitionedCall` and `StatefulPartitionedCall` nodes in the graph.
  TensorFlow serializes a `ConfigProto` into `PartitionedCall` and
  `StatefulPartitionedCall` the `config_proto` `attr` of graph nodes. This
  overrides any session config that might disable runtime grappler. The disable
  grappler for these nodes as well, this function overwrites the serialized
  configproto, setting the `disable_meta_optimizer` field to `True.
  Args:
    proto: Instance of `computation_pb2.Computation` with the `tensorflow` field
      populated.
  Returns:
    A transformed instance of `computation_pb2.Computation` with a `tensorflow`
    field.
  """
  py_typecheck.check_type(proto, computation_pb2.Computation)
  computation_oneof = proto.WhichOneof('computation')
  if computation_oneof != 'tensorflow':
    raise TypeError(
        '`prune_tensorflow_proto` only accepts `Computation` '
        'protos of the "tensorflow" variety; you have passed '
        'one of variety {}.'.format(computation_oneof)
    )
  original_tf = proto.tensorflow
  graph_def = serialization_utils.unpack_graph_def(original_tf.graph_def)
  all_nodes = itertools.chain(
      graph_def.node, *[f.node_def for f in graph_def.library.function]
  )
  for node in all_nodes:
    if node.op not in CALL_OPS:
      continue
    attr_str = node.attr.get('config_proto')
    if attr_str is None:
      config_proto = tf.compat.v1.ConfigProto()
    else:
      config_proto = tf.compat.v1.ConfigProto.FromString(attr_str.s)
    config_proto.graph_options.rewrite_options.disable_meta_optimizer = True
    attr_str.s = config_proto.SerializeToString(deterministic=True)
  tf_block = computation_pb2.TensorFlow(
      graph_def=serialization_utils.pack_graph_def(graph_def),
      initialize_op=original_tf.initialize_op
      if original_tf.initialize_op
      else None,
      parameter=original_tf.parameter
      if original_tf.HasField('parameter')
      else None,
      result=original_tf.result,
      layout_map=original_tf.layout_map,
  )
  new_proto = computation_pb2.Computation(type=proto.type, tensorflow=tf_block)
  return new_proto