code: def test_associativity_in_bin_num_expr(op1, op2):
      expr1 = ast.BinNumExpr(
          left=ast.NumVal(1.0),
          right=ast.BinNumExpr(
              left=ast.NumVal(1.0), right=ast.NumVal(1.0), op=op2
          ),
          op=op1,
      )
      if op1 in {ast.BinNumOpType.ADD, ast.BinNumOpType.MUL}:
          op_code_line = f"1.0 {op1.value} 1.0 {op2.value} 1.0"
      else:
          op_code_line = f"1.0 {op1.value} (1.0 {op2.value} 1.0)"
      expected_code1 = f"""
  defmodule Model do
      @compile {{:inline, read: 2}}
      defp read(bin, pos) do
          <<_::size(pos)-unit(64)-binary, value::float, _::binary>> = bin
          value
      end
      defp list_to_binary(list) do
          for i <- list, into: <<>>, do: <<i::float>>
      end
      def score(input) do
          input = list_to_binary(input)
          {op_code_line}
      end
  end
  """
  
      expr2 = ast.BinNumExpr(
          left=ast.BinNumExpr(
              left=ast.NumVal(1.0), right=ast.NumVal(1.0), op=op1
          ),
          right=ast.NumVal(1.0),
          op=op2,
      )
      expected_code2 = f"""
  defmodule Model do
      @compile {{:inline, read: 2}}
      defp read(bin, pos) do
          <<_::size(pos)-unit(64)-binary, value::float, _::binary>> = bin
          value
      end
      defp list_to_binary(list) do
          for i <- list, into: <<>>, do: <<i::float>>
      end
      def score(input) do
          input = list_to_binary(input)
          1.0 {op1.value} 1.0 {op2.value} 1.0
      end
  end
  """
  
      interpreter = ElixirInterpreter()
      assert_code_equal(interpreter.interpret(expr1), expected_code1)
      assert_code_equal(interpreter.interpret(expr2), expected_code2)
  
imports: from itertools import product
  import pytest
  from m2cgen import ast
  from m2cgen.interpreters import ElixirInterpreter
  from tests.utils import assert_code_equal
label_desc: Use image node_id 3 for calling a global function with example usage: test_associativity_in_bin_num_expr(op1, op2) without return types