code: def _split_repeated_field(
      proto: message.Message,
      new_proto: message.Message,
      fields: util.FieldTypes,
      start_index: int,
      end_index: Optional[int] = None,
  ) -> None:
      """Generic function for copying a repeated field from one proto to another."""
      util.get_field(new_proto, fields)[0].MergeFrom(
          util.get_field(proto, fields)[0][start_index:end_index]
      )
  
imports: from collections.abc import Sequence
  import itertools
  from typing import Optional, Type
  from google.protobuf import message
  from tensorflow.core.framework import graph_pb2
  from tensorflow.core.framework import node_def_pb2
  from tensorflow.python.framework import tensor_util
  from tensorflow.tools.proto_splitter import constants
  from tensorflow.tools.proto_splitter import split
  from tensorflow.tools.proto_splitter import util
label_desc: Use image node_id 2 for calling a global function with example usage: _split_repeated_field(proto, new_proto, fields, start_index, end_index) without return types