class_docstr: A collection of protobufs dynamically constructed by descriptor protos.
class_docstr_tok: ["A","collection","of","protobufs","dynamically","constructed","by","descriptor","protos","."]
docstr: Gets the extension of the specified message with the specified number.
  
  Extensions have to be registered to this pool by calling :func:`Add` or
  :func:`AddExtensionDescriptor`.
  
  Args:
    message_descriptor (Descriptor): descriptor of the extended message.
    number (int): Number of the extension field.
  
  Returns:
    FieldDescriptor: The descriptor for the extension.
  
  Raises:
    KeyError: when no extension with the given number is known for the
      specified message.
code: def FindExtensionByNumber(self, message_descriptor, number):
      """Gets the extension of the specified message with the specified number.
  
      Extensions have to be registered to this pool by calling :func:`Add` or
      :func:`AddExtensionDescriptor`.
  
      Args:
        message_descriptor (Descriptor): descriptor of the extended message.
        number (int): Number of the extension field.
  
      Returns:
        FieldDescriptor: The descriptor for the extension.
  
      Raises:
        KeyError: when no extension with the given number is known for the
          specified message.
      """
      try:
          return self._extensions_by_number[message_descriptor][number]
      except KeyError:
          self._TryLoadExtensionFromDB(message_descriptor, number)
          return self._extensions_by_number[message_descriptor][number]
  
imports: import collections
  import warnings
  from google.protobuf import descriptor
  from google.protobuf import descriptor_database
  from google.protobuf import text_encoding
label_desc: Use image node_id 24 for calling the DescriptorPool obj's underlying member method code with example usage: obj.FindExtensionByNumber(message_descriptor, number) and returns: self, self