code: def assert_finite(tensor, name):
      assert ((tensor - tensor) == 0).all(), "bad {}: {}".format(
          tensor, name
      )
  
imports: import logging
  import pytest
  import torch
  from torch.autograd import grad
  import pyro
  import pyro.distributions
  from pyro.contrib.tracking.assignment import MarginalAssignment, MarginalAssignmentPersistent, MarginalAssignmentSparse
  from tests.common import assert_equal
label_desc: Use image node_id 1 for calling a global function with example usage: assert_finite(tensor, name) without return types