code: def prob_check(tensor, eps=1e-10):
      assert not torch.isnan(
          tensor
      ).any(), "Nan in a probability tensor."
      # Add the eps here to prevent errors introduced by precision
      assert (
          tensor.le(1.0 + eps).all() and tensor.ge(0.0 - eps).all()
      ), (
          "Incorrect values in a probability tensor"
          ", 0.0 <= tensor <= 1.0"
      )
  
imports: import torch
label_desc: Use image node_id 1 for calling a global function with example usage: prob_check(tensor, eps) without return types