code: def GetPresetsByOperatingSystem(self, operating_system):
      
      preset_definitions = []
      for preset_definition in self._definitions.values():
        for preset_operating_system in preset_definition.operating_systems:
          if preset_operating_system.IsEquivalent(operating_system):
            preset_definitions.append(preset_definition)
  
      return preset_definitions
docs: Retrieves preset definitions for a specific operating system.
  
      Args:
        operating_system (OperatingSystemArtifact): an operating system artifact
            attribute container.
  
      Returns:
        list[PresetDefinition]: preset definition that correspond with the
            operating system.