protected ImplicitField getReferencedImplicitField(Field curField, VariableLiteral variableLiteral) {
        // Check the parent, if this references an implicit field in the parent directly.
        if (isVariableLiteralImplicitField(variableLiteral)) {
            return getReferencedImplicitField(variableLiteral);
        }
        // If there's a switchField, try to find a case that contains the current field and
        // check that one if the current variableLiteral references an implicit field.
        if(thisType.isComplexTypeDefinition() && thisType.asComplexTypeDefinition().orElseThrow().getSwitchField().isPresent()) {
            final SwitchField switchField = thisType.asComplexTypeDefinition().orElseThrow().getSwitchField().get();
            for (DiscriminatedComplexTypeDefinition aCase : switchField.getCases()) {
                // If this case contains the currently observed field, then we'll search this case for matching implicit fields.
                if(aCase.getFields().stream().anyMatch(field -> field == curField)) {
                    if(aCase.isVariableLiteralImplicitField(variableLiteral)) {
                        return aCase.getReferencedImplicitField(variableLiteral);
                    }
                }
            }
        }
        return null;
    }
Helper for collecting referenced non simple types as these usually need to be
imported in some way.

@param baseType the base type we want to get the type references from
@return collection of non simple type references used in the type.
code-generation/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java