code: def test_softmax_expr():
      expr = ast.SoftmaxExpr([ast.NumVal(2.0), ast.NumVal(3.0)])
  
      expected_code = """
  fn score(input: Vec<f64>) -> Vec<f64> {
      softmax(vec![2.0_f64, 3.0_f64])
  }
  fn softmax(x: Vec<f64>) -> Vec<f64> {
      let size: usize = x.len();
      let m: f64 = x.iter().fold(std::f64::MIN, |a, b| a.max(*b));
      let mut exps: Vec<f64> = vec![0.0_f64; size];
      let mut s: f64 = 0.0_f64;
      for (i, &v) in x.iter().enumerate() {
          exps[i] = (v - m).exp();
          s += exps[i];
      }
      exps.iter().map(|&i| i / s).collect::<Vec<f64>>()
  }
  """
  
      interpreter = RustInterpreter()
      assert_code_equal(interpreter.interpret(expr), expected_code)
  
imports: from itertools import product
  import pytest
  from m2cgen import ast
  from m2cgen.interpreters import RustInterpreter
  from tests.utils import assert_code_equal
label_desc: Use image node_id 18 for calling a global function with example usage: test_softmax_expr() without return types