code: def test_cpu_approx_backwards(
      self, test_case_description, sigmas, input, expected
  ):
      # Params to determine the implementation to test
      device = torch.device("cpu")
      fast_approx = True
  
      # Prepare input tensor
      input_tensor = torch.from_numpy(np.array(input)).to(
          dtype=torch.float, device=device
      )
      input_tensor.requires_grad = True
  
      # Prepare args
      args = (input_tensor, *sigmas, fast_approx)
  
      # Run grad check
      gradcheck(BilateralFilter.apply, args, raise_exception=False)
  
file_path: MONAI/tests/test_bilateral_approx_cpu.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from torch.autograd import gradcheck
  from monai.networks.layers.filtering import BilateralFilter
  from tests.utils import skip_if_no_cpp_extension
label_desc: Use image node_id 2 for calling the BilateralFilterTestCaseCpuApprox obj's underlying member method code with example usage: obj.test_cpu_approx_backwards(test_case_description, sigmas, input, expected) without return types