code: def test_to_kwargs(self):
      def foo(**kwargs):
          results = {k: v * 2 for k, v in kwargs.items()}
          return results
  
      def compose_like(fn, data):
          data = fn(data)
          return data
  
      d = {"a": 1, "b": 2}
  
      actual = compose_like(to_kwargs(foo), d)
      self.assertDictEqual(actual, {"a": 2, "b": 4})
  
      with self.assertRaises(TypeError):
          actual = compose_like(foo, d)
  
file_path: MONAI/tests/test_adaptors.py
imports: from __future__ import annotations
  import itertools
  import unittest
  from monai.transforms.adaptors import FunctionSignature, adaptor, apply_alias, to_kwargs
label_desc: Use image node_id 1 for calling the TestToKwargs obj's underlying member method code with example usage: obj.test_to_kwargs() and returns: results, data