public boolean needPointerAccess(TypeReference typeReference) {
        boolean isNotAnComplexTypeReference = !typeReference.isComplexTypeReference();
        boolean arrayTypeIsNotAnComplexTypeReference = !(typeReference.isArrayTypeReference() && typeReference.asArrayTypeReference().orElseThrow().getElementTypeReference().isComplexTypeReference());
        return isNotAnComplexTypeReference && arrayTypeIsNotAnComplexTypeReference;
    }
Returns true if the given type reference needs pointer access or not. This
method is used to determine whether the generated code needs to use a
pointer for accessing data of the given type.

<p>
This method returns true if the type reference is not a complex type reference
and the type reference is not an array type reference or if the array type
reference has an element type reference that is not a complex type reference.

@param typeReference the type reference to check
@return true if the type reference needs pointer access, false otherwise
code-generation/language-python/src/main/java/org/apache/plc4x/language/python/PythonLanguageTemplateHelper.java