code: def _assert_init_user_params(
      params_og: Optional[Dict[str, Any]],
      expected_params: Dict[str, Any],
      expected_params_aux: Dict[str, Any],
      **kwargs,
  ):
      """
      Assert that `AbstractModel._init_user_params` works as intended
      and that `AbstractModel` calls `AbstractModel._init_user_params` in the expected way during init.
      """
      expected_params_og = (
          copy.deepcopy(params_og)
          if params_og is not None
          else params_og
      )
      params, params_aux = AbstractModel._init_user_params(
          params=params_og, **kwargs
      )
      assert (
          params_og == expected_params_og
      )  # Ensure no outer context update
      assert params == expected_params
      assert params_aux == expected_params_aux
  
      if kwargs is None or len(kwargs.keys()) == 0:
          abstract_model = AbstractModel(
              name="", path="", hyperparameters=params_og
          )
          assert params_og == expected_params_og
          assert abstract_model._user_params == expected_params
          assert abstract_model._user_params_aux == expected_params_aux
  
file_path: autogluon/core/tests/unittests/models/abstract_model/test_init_user_params.py
imports: import copy
  from typing import Any, Dict, Optional
  from autogluon.core.models import AbstractModel
label_desc: Use image node_id 1 for calling a global function with example usage: _assert_init_user_params(params_og, expected_params, expected_params_aux) without return types