def _SetAllFieldTypes(self, package, desc_proto, scope):
package = _PrefixWithDot(package)<EOL>main_desc = self._GetTypeFromScope(package, desc_proto.name, scope)<EOL>if package == '<STR_LIT:.>':<EOL><INDENT>nested_package = _PrefixWithDot(desc_proto.name)<EOL><DEDENT>else:<EOL><INDENT>nested_package = '<STR_LIT:.>'.join([package, desc_proto.name])<EOL><DEDENT>for field_proto, field_desc in zip(desc_proto.field, main_desc.fields):<EOL><INDENT>self._SetFieldType(field_proto, field_desc, nested_package, scope)<EOL><DEDENT>for extension_proto, extension_desc in (<EOL>zip(desc_proto.extension, main_desc.extensions)):<EOL><INDENT>extension_desc.containing_type = self._GetTypeFromScope(<EOL>nested_package, extension_proto.extendee, scope)<EOL>self._SetFieldType(extension_proto, extension_desc, nested_package, scope)<EOL><DEDENT>for nested_type in desc_proto.nested_type:<EOL><INDENT>self._SetAllFieldTypes(nested_package, nested_type, scope)<EOL><DEDENT>
Sets all the descriptor's fields's types.

        This method also sets the containing types on any extensions.

        Args:
          package: The current package of desc_proto.
          desc_proto: The message descriptor to update.
          scope: Enclosing scope of available types.