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 op2 == ast.BinNumOpType.DIV:
          op_code_line = "(1.0).fdiv(1.0)"
      else:
          op_code_line = f"1.0 {op2.value} 1.0"
      if op1 not in {
          ast.BinNumOpType.ADD,
          ast.BinNumOpType.MUL,
          ast.BinNumOpType.DIV,
      }:
          op_code_line = f"({op_code_line})"
      if op1 == ast.BinNumOpType.DIV:
          op_code_line = f"(1.0).fdiv({op_code_line})"
      else:
          op_code_line = f"1.0 {op1.value} {op_code_line}"
      expected_code1 = f"""
  def score(input)
      {op_code_line}
  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,
      )
      if op1 == ast.BinNumOpType.DIV:
          op_code_line = "(1.0).fdiv(1.0)"
      else:
          op_code_line = f"1.0 {op1.value} 1.0"
      if op2 == ast.BinNumOpType.DIV:
          op_code_line = f"({op_code_line}).fdiv(1.0)"
      else:
          op_code_line = f"{op_code_line} {op2.value} 1.0"
      expected_code2 = f"""
  def score(input)
      {op_code_line}
  end
  """
  
      interpreter = RubyInterpreter()
      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 RubyInterpreter
  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