code: def GetEventTaggingRules(self):
      
      tagging_rules = {}
  
      label_name = None
      with io.open(self._path, 'r', encoding='utf-8') as tagging_file:
        for line in tagging_file.readlines():
          line = line.rstrip()
  
          stripped_line = line.lstrip()
          if not stripped_line or stripped_line[0] == '#':
            continue
  
          if not line[0].isspace():
            label_name = line
            tagging_rules[label_name] = []
            continue
  
          if not label_name:
            continue
  
          filter_object = event_filter.EventObjectFilter()
  
          try:
            filter_object.CompileFilter(stripped_line)
          except errors.ParseError as exception:
            raise errors.TaggingFileError((
                'Unable to compile filter for label: {0:s} with error: '
                '{1!s}').format(label_name, exception))
  
          if filter_object not in tagging_rules[label_name]:
            tagging_rules[label_name].append(filter_object)
  
      return tagging_rules
docs: Retrieves the event tagging rules from the tagging file.
  
      Returns:
        dict[str, FilterObject]: tagging rules, that consists of one or more
            filter objects per label.
  
      Raises:
        TaggingFileError: if a filter expression cannot be compiled.