public String getDataWriterCall(TypeReference typeReference, String fieldName) {
        if (typeReference.isSimpleTypeReference()) {
            // The type is a simple type, such as a byte or int.
            // We can directly use the methods provided by the simple type.
            return getDataWriterCall(typeReference.asSimpleTypeReference().orElseThrow());
        } else if (typeReference.isArrayTypeReference()) {
            // The type is an array, such as an array of bytes or an array of strings.
            // We need to recursively call getDataWriterCall to determine the name of the PLC4Py
            // type name for the element type of the array.
            return getDataWriterCall(typeReference.asArrayTypeReference().orElseThrow().getElementTypeReference(), fieldName);
        } else if (typeReference.isComplexTypeReference()) {
            // The type is a complex type, such as a struct.
            // We can directly use the write_serializable method.
            return "write_serializable";
        } else {
            throw new IllegalStateException("What is this type? " + typeReference);
        }
    }
Returns the name of the Python data writer method that should be used to write a value of the given type.

<p>
This method is used to generate code for converting a type reference to a PLC4Py type name.

@param typeReference the type reference to get the PLC4Py type name for
@param fieldName the name of the field to write
@return the name of the Python data writer method
code-generation/language-python/src/main/java/org/apache/plc4x/language/python/PythonLanguageTemplateHelper.java