code: def test_instantiate_bad_adam_conf(
      instantiate_func: Any, recwarn: Any
  ) -> None:
      msg = re.escape(
          dedent(
              """\
              Config has missing value for key `_target_`, cannot instantiate.
              Config type: BadAdamConf
              Check that the `_target_` key in your dataclass is properly annotated and overridden.
              A common problem is forgetting to annotate _target_ as a string : '_target_: str = ...'"""
          )
      )
      with raises(
          InstantiationException,
          match=msg,
      ):
          instantiate_func(BadAdamConf())
  
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 15 for calling a global function with example usage: test_instantiate_bad_adam_conf(instantiate_func, recwarn) without return types