code: def test_safe_div_tensor_denom(self) -> None:
      num = torch.tensor([4.0, 6.0])
  
      exp = torch.tensor([2.0, 3.0])
      assert (safe_div(num, torch.tensor([2.0, 2.0])) == exp).all()
  
      # tensor default denom
      assert (
          safe_div(num, torch.tensor([0.0, 0.0]), torch.tensor(2.0))
          == exp
      ).all()
      assert (
          safe_div(
              num,
              torch.tensor([0.0, 0.0]),
              torch.tensor([2.0, 2.0]),
          )
          == exp
      ).all()
  
      # float default denom
      assert (safe_div(num, torch.tensor([0.0, 0.0]), 2.0) == exp).all()
  
imports: from typing import cast, List, Tuple
  import torch
  from captum._utils.common import _format_feature_mask, _get_max_feature_index, _parse_version, _reduce_list, _select_targets, _sort_key_list, safe_div
  from tests.helpers.basic import assertTensorAlmostEqual, assertTensorTuplesAlmostEqual, BaseTest
label_desc: Use image node_id 2 for calling the Test obj's underlying member method code with example usage: obj.test_safe_div_tensor_denom() without return types