code: def testLargeNodes(self):
      # Large nodes are greedily split from the original proto if they are
      # larger than max_size / 3.
      sizes = [50, 95, 95, 95, 50, 95]
      max_size = 200
      constants.debug_set_max_size(max_size)
  
      # This should create 6 chunks:
      #   [parent GraphDef, node[1], node[2], node[3], node[5], ChunkedMessage]
      graph_def = self._make_graph_def_with_constant_nodes(sizes)
      s = split_graph_def.GraphDefSplitter(self._copy_graph(graph_def))
      chunks, chunked_message = s.split()
      self.assertLen(chunks, 5)
      self._assert_chunk_sizes(chunks, max_size)
  
      # Check large nodes are chunked away.
      self.assertProtoEquals(graph_def.node[1], chunks[1])
      self.assertProtoEquals(graph_def.node[2], chunks[2])
      self.assertProtoEquals(graph_def.node[3], chunks[3])
      self.assertProtoEquals(graph_def.node[5], chunks[4])
  
      # Check that the parent GraphDef still contains small nodes.
      self.assertProtoEquals(graph_def.node[0], chunks[0].node[0])
      self.assertProtoEquals(graph_def.node[4], chunks[0].node[4])
  
      # Check that the parent GraphDef contains empty nodes where the large nodes
      # were originally.
      self.assertEqual(0, chunks[0].node[1].ByteSize())
      self.assertEqual(0, chunks[0].node[2].ByteSize())
      self.assertEqual(0, chunks[0].node[3].ByteSize())
      self.assertEqual(0, chunks[0].node[5].ByteSize())
  
      # Check the ChunkedMessage proto.
      self.assertLen(chunked_message.chunked_fields, 4)
      self._assert_field_tags(
          util.get_field_tag(graph_def, ["node", 1]),
          chunked_message.chunked_fields[0].field_tag,
      )
      self._assert_field_tags(
          util.get_field_tag(graph_def, ["node", 2]),
          chunked_message.chunked_fields[1].field_tag,
      )
      self._assert_field_tags(
          util.get_field_tag(graph_def, ["node", 3]),
          chunked_message.chunked_fields[2].field_tag,
      )
      self._assert_field_tags(
          util.get_field_tag(graph_def, ["node", 5]),
          chunked_message.chunked_fields[3].field_tag,
      )
  
imports: import itertools
  from google.protobuf import message
  from google.protobuf import text_format
  from tensorflow.core.framework import function_pb2
  from tensorflow.core.framework import graph_pb2
  from tensorflow.python.platform import test
  from tensorflow.tools.proto_splitter import chunk_pb2
  from tensorflow.tools.proto_splitter import constants
  from tensorflow.tools.proto_splitter import split_graph_def
  from tensorflow.tools.proto_splitter import util
  from tensorflow.tools.proto_splitter.python import test_util
label_desc: Use image node_id 8 for calling the GraphDefSplitterTest obj's underlying member method code with example usage: obj.testLargeNodes() without return types