public List<DiscriminatedComplexTypeDefinition> getUniqueSwitchCases(List<DiscriminatedComplexTypeDefinition> allSwitchCases) {
        Map<String, DiscriminatedComplexTypeDefinition> switchCases = new LinkedHashMap<>();
        for (DiscriminatedComplexTypeDefinition switchCase : allSwitchCases) {
            // Check if the given switch case already exists in the map.
            // If not, add it to the map.
            if (!switchCases.containsKey(switchCase.getName())) {
                switchCases.put(switchCase.getName(), switchCase);
            }
        }
        // Convert the map values to a list and return it.
        return new ArrayList<>(switchCases.values());
    }
Returns a list of unique {@link DiscriminatedComplexTypeDefinition}s from the given list.
<p>
This is used by the generated Python code to filter out duplicates in a {@link DiscriminatedComplexTypeDefinition} list.

@param allSwitchCases the list of {@link DiscriminatedComplexTypeDefinition}s to filter.
@return a list of unique {@link DiscriminatedComplexTypeDefinition}s.
code-generation/language-python/src/main/java/org/apache/plc4x/language/python/PythonLanguageTemplateHelper.java