code: def test_grad_norm_invalid_norm_type(norm_type):
      with pytest.raises(
          ValueError,
          match="`norm_type` must be a positive number or 'inf'",
      ):
          grad_norm(Mock(), norm_type)
  
file_path: pytorch-lightning/tests/tests_pytorch/utilities/test_grads.py
imports: from unittest.mock import Mock
  import pytest
  import torch
  import torch.nn
  from lightning.pytorch.utilities import grad_norm
label_desc: Use image node_id 2 for calling a global function with example usage: test_grad_norm_invalid_norm_type(norm_type) without return types