code: def test_cast_conversions(value: Any, expected_value: Any) -> None:
      for field in ("int", "float", "bool", "str"):
          cast_str = f"{field}({value})"
          expected = getattr(expected_value, field)
          if isinstance(expected, RaisesContext):
              with expected:
                  parser.parse_rule(cast_str, "function")
          else:
              result = parser.parse_rule(cast_str, "function")
              assert eq(
                  result, expected
              ), f"{field} cast result mismatch"
  
imports: import builtins
  import math
  import re
  from dataclasses import dataclass
  from typing import Any, Callable, Dict, List, Union
  from _pytest.python_api import RaisesContext
  from pytest import mark, param, raises, warns
  from hydra import version
  from hydra._internal.grammar.functions import Functions
  from hydra._internal.grammar.utils import escape_special_characters
  from hydra.core.override_parser.overrides_parser import OverridesParser, create_functions
  from hydra.core.override_parser.types import ChoiceSweep, FloatRange, Glob, IntervalSweep, Key, Override, OverrideType, Quote, QuotedString, RangeSweep, Sweep, Transformer, ValueType
  from hydra.errors import HydraException
label_desc: Use image node_id 29 for calling a global function with example usage: test_cast_conversions(value, expected_value) without return types