class_docstr: Factory for creating Proto2 messages from descriptors in a pool.
docstr: Gets all the messages from a specified file.
  
  This will find and resolve dependencies, failing if the descriptor
  pool cannot satisfy them.
  
  Args:
    files: The file names to extract messages from.
  
  Returns:
    A dictionary mapping proto names to the message classes. This will include
    any dependent messages as well as any messages defined in the same file as
    a specified message.
code: def GetMessages(self, files):
      """Gets all the messages from a specified file.
  
      This will find and resolve dependencies, failing if the descriptor
      pool cannot satisfy them.
  
      Args:
        files: The file names to extract messages from.
  
      Returns:
        A dictionary mapping proto names to the message classes. This will include
        any dependent messages as well as any messages defined in the same file as
        a specified message.
      """
      result = {}
      for file_name in files:
          file_desc = self.pool.FindFileByName(file_name)
          for desc in file_desc.message_types_by_name.values():
              result[desc.full_name] = self.GetPrototype(desc)
  
          # While the extension FieldDescriptors are created by the descriptor pool,
          # the python classes created in the factory need them to be registered
          # explicitly, which is done below.
          #
          # The call to RegisterExtension will specifically check if the
          # extension was already registered on the object and either
          # ignore the registration if the original was the same, or raise
          # an error if they were different.
  
          for extension in file_desc.extensions_by_name.values():
              if extension.containing_type not in self._classes:
                  self.GetPrototype(extension.containing_type)
              extended_class = self._classes[extension.containing_type]
              extended_class.RegisterExtension(extension)
      return result
  
file_path: catboost/contrib/python/protobuf/py3/google/protobuf/message_factory.py
imports: from google.protobuf.internal import api_implementation
  from google.protobuf import descriptor_pool
  from google.protobuf import message
label_desc: Use image node_id 4 for calling the MessageFactory obj's underlying member method code with example usage: obj.GetMessages(files) and returns: result