code: def _parse(self, globals_dict):
          
  
          globals = {}
  
          if not isinstance(globals_dict, dict):
              raise InvalidGlobalsSectionException(self._KEYWORD,
                                                   "It must be a non-empty dictionary".format(self._KEYWORD))
  
          for section_name, properties in globals_dict.items():
              resource_type = self._make_resource_type(section_name)
  
              if resource_type not in self.supported_properties:
                  raise InvalidGlobalsSectionException(self._KEYWORD,
                                                       "'{section}' is not supported. "
                                                       "Must be one of the following values - {supported}"
                                                       .format(section=section_name,
                                                               supported=self.supported_resource_section_names))
  
              if not isinstance(properties, dict):
                  raise InvalidGlobalsSectionException(self._KEYWORD, "Value of ${section} must be a dictionary")
  
              for key, value in properties.items():
                  supported = self.supported_properties[resource_type]
                  if key not in supported:
                      raise InvalidGlobalsSectionException(self._KEYWORD,
                                                           "'{key}' is not a supported property of '{section}'. "
                                                           "Must be one of the following values - {supported}"
                                                           .format(key=key, section=section_name, supported=supported))
  
              # Store all Global properties in a map with key being the AWS::Serverless::* resource type
              globals[resource_type] = GlobalProperties(properties)
  
          return globals
docs: Takes a SAM template as input and parses the Globals section
  
          :param globals_dict: Dictionary representation of the Globals section
          :return: Processed globals dictionary which can be used to quickly identify properties to merge
          :raises: InvalidResourceException if the input contains properties that we don't support