code: def test_convert_params():
      """Test conversion of params to a dict."""
      # Test normal dict, make sure it is unchanged
      params = {
          "string": "string",
          "int": 1,
          "float": 0.1,
          "bool": True,
          "none": None,
      }
      expected = params.copy()
      assert _convert_params(params) == expected
  
      # Test None conversion
      assert _convert_params(None) == {}
  
      # Test conversion of argparse Namespace
      params = Namespace(
          string="string", int=1, float=0.1, bool=True, none=None
      )
      expected = vars(params)
      assert _convert_params(params) == expected
  
file_path: pytorch-lightning/tests/tests_fabric/utilities/test_logger.py
imports: from argparse import Namespace
  from dataclasses import dataclass
  import numpy
  import torch
  from lightning.fabric.utilities.logger import _add_prefix, _convert_params, _flatten_dict, _sanitize_callable_params, _sanitize_params
label_desc: Use image node_id 1 for calling a global function with example usage: test_convert_params() without return types