def _as_spl_expr(value):
import streamsx._streams._numpy<EOL>if hasattr(value, '<STR_LIT>'):<EOL><INDENT>return value<EOL><DEDENT>if isinstance(value, Enum):<EOL><INDENT>value = streamsx.spl.op.Expression.expression(value.name)<EOL><DEDENT>npcnv = streamsx._streams._numpy.as_spl_expr(value)<EOL>if npcnv is not None:<EOL><INDENT>return npcnv<EOL><DEDENT>return value<EOL>
Return value converted to an SPL expression if
    needed other otherwise value.