code: def test_get_init_args():
      class AutomaticArgsModel:
          def __init__(self, anyarg, anykw=42, **kwargs):
              super().__init__()
  
              self.get_init_args_wrapper()
  
          def get_init_args_wrapper(self):
              frame = inspect.currentframe().f_back
              self.result = _get_init_args(frame)
  
      my_class = AutomaticArgsModel("test", anykw=32, otherkw=123)
      assert my_class.result == (
          my_class,
          {"anyarg": "test", "anykw": 32, "otherkw": 123},
      )
  
      my_class.get_init_args_wrapper()
      assert my_class.result == (None, {})
  
file_path: pytorch-lightning/tests/tests_pytorch/utilities/test_parsing.py
imports: import inspect
  import threading
  import pytest
  from lightning.pytorch import LightningDataModule, LightningModule, Trainer
  from lightning.pytorch.utilities.parsing import _get_init_args, clean_namespace, collect_init_args, is_picklable, lightning_getattr, lightning_hasattr, lightning_setattr, parse_class_init_keys
  from torch.jit import ScriptModule
label_desc: Use image node_id 8 for calling a global function with example usage: test_get_init_args() without return types