third_party/protobuf/python/google/protobuf/text_format.py
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
  if descriptor_pool is None:
    from google.protobuf import descriptor_pool as pool_mod
    descriptor_pool = pool_mod.Default()
  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()
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):
  if descriptor_pool is None:
    from google.protobuf import descriptor_pool as pool_mod
    descriptor_pool = pool_mod.Default()
  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 ) : if descriptor_pool is None : from google . protobuf import descriptor_pool as pool_mod descriptor_pool = pool_mod . Default ( ) 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 ( )
Returns a protobuf message instance.
Returns a protobuf message instance .
"""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
A Message instance of type matching type_name, or None if the a Descriptor
wasn't found matching type_name.
A Message instance of type matching type_name or None if the a Descriptor wasn ' t found matching type_name .
type_name
Fully-qualified protobuf  message type name string.
Fully - qualified protobuf message type name string .
descriptor_pool
None