(type_name, descriptor_pool)
return message_type()
Returns a protobuf message instance.

  Args:
    type_name: Fully-qualified protobuf  message type name string.
    descriptor_pool: DescriptorPool instance.

  Returns:
    A Message instance of type matching type_name, or None if the a Descriptor
    wasn't found matching type_name.
Returns a protobuf message instance.
Returns a protobuf message instance .
def _BuildMessageFromTypeName(type_name, descriptor_pool):
  """Returns a protobuf message instance.

  Args:
    type_name: Fully-qualified protobuf  message type name string.
    descriptor_pool: DescriptorPool instance.

  Returns:
    A Message instance of type matching type_name, or None if the a Descriptor
    wasn't found matching type_name.
  """
  # pylint: disable=g-import-not-at-top
  from google.protobuf import symbol_database
  database = symbol_database.Default()
  try:
    message_descriptor = descriptor_pool.FindMessageTypeByName(type_name)
  except KeyError:
    return None
  message_type = database.GetPrototype(message_descriptor)
  return message_type()
def _BuildMessageFromTypeName ( type_name , descriptor_pool ) : # pylint: disable=g-import-not-at-top from google . protobuf import symbol_database database = symbol_database . Default ( ) try : message_descriptor = descriptor_pool . FindMessageTypeByName ( type_name ) except KeyError : return None message_type = database . GetPrototype ( message_descriptor ) return message_type ( )