private String getCastExpressionForTypeReference(TypeReference typeReference) {
        Tracer tracer = pythonTracerStart("castExpression");
        if (typeReference instanceof SimpleTypeReference) {
            // Simple type reference, just use the language name
            // e.g. int, char, etc.
            return tracer.dive("simpleTypeRef") + getLanguageTypeNameForTypeReference(typeReference);
        } else if (typeReference instanceof ByteOrderTypeReference) {
            // Byte order, use the binary.ByteOrder enum
            return tracer.dive( "byteOrderTypeRef") + "binary.ByteOrder";
        } else if (typeReference != null) {
            // Complex type reference, use the Cast class
            // e.g. Cast[int], Cast[Char], etc.
            return tracer.dive("anyTypeRef") + "Cast" + getLanguageTypeNameForTypeReference(typeReference);
        } else {
            // No type reference, return an empty string
            return tracer.dive("noTypeRef") + "";
        }
    }
Returns a Python expression that represents a cast operation for the given
type reference.

@param typeReference the type reference to cast the data to
@return a Python expression representing the cast operation
code-generation/language-python/src/main/java/org/apache/plc4x/language/python/PythonLanguageTemplateHelper.java