def METHOD_NAME(packet: mp_packet.Packet) -> message.Message:
  """Get the content of a MediaPipe proto Packet as a proto message.
  Args:
    packet: A MediaPipe proto Packet.
  Returns:
    A proto message.
  Raises:
    TypeError: If the message descriptor can't be found by type name.
  Examples:
    detection = detection_pb2.Detection()
    text_format.Parse('score: 0.5', detection)
    proto_packet = mp.packet_creator.create_proto(detection)
    output_proto = mp.packet_getter.get_proto(proto_packet)
  """
  # pylint:disable=protected-access
  proto_type_name = _packet_getter._get_proto_type_name(packet)
  # pylint:enable=protected-access
  try:
    descriptor = symbol_database.Default().pool.FindMessageTypeByName(
        proto_type_name)
  except KeyError:
    raise TypeError('Can not find message descriptor by type name: %s' %
                    proto_type_name)
  message_class = symbol_database.Default().GetPrototype(descriptor)
  # pylint:disable=protected-access
  serialized_proto = _packet_getter._get_serialized_proto(packet)
  # pylint:enable=protected-access
  proto_message = message_class()
  proto_message.ParseFromString(serialized_proto)
  return proto_message