code: def create_proto(proto_message: message.Message) -> packet.Packet:
      """Create a MediaPipe protobuf message packet.
  
      Args:
        proto_message: A Python protobuf message.
  
      Returns:
        A MediaPipe protobuf message Packet.
  
      Raises:
        RuntimeError: If the protobuf message type is not registered in MediaPipe.
  
      Examples:
        detection = detection_pb2.Detection()
        text_format.Parse('score: 0.5', detection)
        packet = mp.packet_creator.create_proto(detection)
        output_detection = mp.packet_getter.get_proto(packet)
      """
      # pylint:disable=protected-access
      return _packet_creator._create_proto(
          proto_message.DESCRIPTOR.full_name,
          proto_message.SerializeToString(),
      )
  
file_path: mediapipe/mediapipe/python/packet_creator.py
imports: from typing import List, Union
  import warnings
  import numpy
  from google.protobuf import message
  from mediapipe.python._framework_bindings import _packet_creator
  from mediapipe.python._framework_bindings import image
  from mediapipe.python._framework_bindings import image_frame
  from mediapipe.python._framework_bindings import packet
label_desc: Use image node_id 3 for calling a global function with example usage: create_proto(proto_message) and returns: _packet_creator