code: def test_safe_cdist():
      from deepchem.utils.safeops_utils import safe_cdist
  
      a = torch.tensor([[1.0, 2], [3, 4]])
      b = torch.tensor([[1.0, 2], [3, 4]])
  
      result_1 = safe_cdist(a, b)
      assert torch.allclose(
          result_1, torch.tensor([[0.0000, 2.8284], [2.8284, 0.0000]])
      )
  
      result_2 = safe_cdist(a, b, add_diag_eps=True)
      assert torch.allclose(
          result_2,
          torch.tensor(
              [[1.4142e-12, 2.8284e00], [2.8284e00, 1.4142e-12]]
          ),
      )
  
imports: import pytest
label_desc: Use image node_id 6 for calling a global function with example usage: test_safe_cdist() without return types