class_docstr: A collection of protobufs dynamically constructed by descriptor protos.
class_docstr_tok: ["A","collection","of","protobufs","dynamically","constructed","by","descriptor","protos","."]
docstr: Finds a given type name in the current scope.
  
  Args:
    package: The package the proto should be located in.
    type_name: The name of the type to be found in the scope.
    scope: Dict mapping short and full symbols to message and enum types.
  
  Returns:
    The descriptor for the requested type.
code: def _GetTypeFromScope(self, package, type_name, scope):
      """Finds a given type name in the current scope.
  
      Args:
        package: The package the proto should be located in.
        type_name: The name of the type to be found in the scope.
        scope: Dict mapping short and full symbols to message and enum types.
  
      Returns:
        The descriptor for the requested type.
      """
      if type_name not in scope:
          components = _PrefixWithDot(package).split(".")
          while components:
              possible_match = ".".join(components + [type_name])
              if possible_match in scope:
                  type_name = possible_match
                  break
              else:
                  components.pop(-1)
      return scope[type_name]
  
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 41 for calling the DescriptorPool obj's underlying member method code with example usage: obj._GetTypeFromScope(package, type_name, scope) and returns: scope