public boolean requiresCurPos() {
        // Iterate over all fields of the complex type definition.
        if (thisType instanceof ComplexTypeDefinition) {
            ComplexTypeDefinition complexTypeDefinition = (ComplexTypeDefinition) this.thisType;

            // If any of the fields require a "curPos" variable, return true.
            for (Field curField : complexTypeDefinition.getFields()) {
                if (requiresVariable(curField, "curPos")) {
                    return true;
                }
            }

            // If none of the fields require a "curPos" variable, return false.
            return false;
        }

        // If the complex type definition is null, return false.
        return false;
    }
Checks whether the complex type definition requires a "curPos" variable.

@return true if a "curPos" variable is required, false otherwise
code-generation/language-python/src/main/java/org/apache/plc4x/language/python/PythonLanguageTemplateHelper.java