code: def test_convert_params(
      instantiate_func: Any,
      input_: Any,
      expected: Any,
      convert_mode: Any,
  ) -> None:
      cfg = OmegaConf.create(input_)
      kwargs = {"a": {"_convert_": convert_mode}}
      ret = instantiate_func(cfg.obj, **kwargs)
  
      if convert_mode in (
          ConvertMode.PARTIAL,
          ConvertMode.OBJECT,
          ConvertMode.ALL,
      ):
          assert isinstance(ret.a.a, dict)
          assert isinstance(ret.a.b, list)
      elif convert_mode in (None, ConvertMode.NONE):
          assert isinstance(ret.a.a, DictConfig)
          assert isinstance(ret.a.b, ListConfig)
      else:
          assert False
  
      assert ret.a == expected
  
imports: import copy
  import pickle
  import re
  from dataclasses import dataclass
  from functools import partial
  from textwrap import dedent
  from typing import Any, Callable, Dict, List, Optional, Tuple
  from omegaconf import MISSING, DictConfig, ListConfig, MissingMandatoryValue, OmegaConf
  from pytest import fixture, mark, param, raises, warns
  import hydra
  from hydra import version
  from hydra.errors import InstantiationException
  from hydra.test_utils.test_utils import assert_multiline_regex_search
  from hydra.types import ConvertMode, TargetConf
  from tests.instantiate import AClass, Adam, AdamConf, AnotherClass, ArgsClass, ASubclass, BadAdamConf, BClass, CenterCrop, CenterCropConf, Compose, ComposeConf, IllegalType, KeywordsInParamsClass, Mapping, MappingConf, NestedConf, NestingClass, OuterClass, Parameters, Rotation, RotationConf, SimpleClass, SimpleClassDefaultPrimitiveConf, SimpleClassNonPrimitiveConf, SimpleClassPrimitiveConf, SimpleDataClass, Tree, TreeConf, UntypedPassthroughClass, UntypedPassthroughConf, User, add_values, module_function, module_function2, partial_equal, recisinstance
label_desc: Use image node_id 30 for calling a global function with example usage: test_convert_params(instantiate_func, input_, expected, convert_mode) without return types