code: def test_remove_infs_nans(test_input, expected):
      torch_history = wandb.wandb_torch.TorchHistory()
  
      assert torch.equal(
          torch_history._remove_infs_nans(test_input), expected
      )
  
file_path: wandb/tests/pytest_tests/unit_tests/test_torch.py
imports: import pytest
  import torch
  import torch.nn
  import wandb
label_desc: Use image node_id 3 for calling a global function with example usage: test_remove_infs_nans(test_input, expected) without return types