def _InternalUnpackAny(msg):
type_url = msg.type_url<EOL>db = symbol_database.Default()<EOL>if not type_url:<EOL><INDENT>return None<EOL><DEDENT>type_name = type_url.split("<STR_LIT:/>")[-<NUM_LIT:1>]<EOL>descriptor = db.pool.FindMessageTypeByName(type_name)<EOL>if descriptor is None:<EOL><INDENT>return None<EOL><DEDENT>message_class = db.GetPrototype(descriptor)<EOL>message = message_class()<EOL>message.ParseFromString(msg.value)<EOL>return message<EOL>
Unpacks Any message and returns the unpacked message.

    This internal method is differnt from public Any Unpack method which takes
    the target message as argument. _InternalUnpackAny method does not have
    target message type and need to find the message type in descriptor pool.

    Args:
      msg: An Any message to be unpacked.

    Returns:
      The unpacked message.