code: def mul(a: Tensor, b: Tensor) -> Tensor:
      _0 = get_constants_like(values=0, ref=a)
      case = (a.isinf() & (b == _0)) | (b.isinf() & (a == _0))
      return torch.where(case, _0, a * torch.where(case, _0, b))
  
imports: from __future__ import annotations
  import math
  from typing import Callable, Tuple, Union
  import torch
  from botorch.exceptions import UnsupportedError
  from botorch.utils.constants import get_constants_like
  from torch import finfo, Tensor
  from torch.nn.functional import softplus
label_desc: Use image node_id 6 for calling a global function with example usage: mul(a, b) and returns: torch