code: def test_it_warns_if_kwargs_are_passed(self) -> None:
      with patch.object(logger, "warning") as mock_warning:
  
          def callable_arg() -> None:
              return
  
          warn_on_kwargs(callable_with_kwargs=callable_arg, foo="")
          mock_warning.assert_called_once_with(
              "Found unexpected kwargs: %s while calling %s "
              "from JSON. These kwargs will be ignored.",
              {"foo": ""},
              callable_arg,
          )
  
file_path: Ax/ax/utils/common/tests/test_kwargutils.py
imports: from logging import Logger
  from typing import Callable, Dict, Optional
  from unittest.mock import patch
  from ax.utils.common.kwargs import validate_kwarg_typing, warn_on_kwargs
  from ax.utils.common.logger import get_logger
  from ax.utils.common.testutils import TestCase
label_desc: Use image node_id 1 for calling the TestWarnOnKwargs obj's underlying member method code with example usage: obj.test_it_warns_if_kwargs_are_passed() without return types