code: def where(
      condition: torch.Tensor,
      x1: Union[float, int, torch.Tensor],
      x2: Union[float, int, torch.Tensor],
      /,
      *,
      out: Optional[torch.Tensor] = None,
  ) -> torch.Tensor:
      x1, x2 = ivy.promote_types_of_inputs(x1, x2)
      if condition.dtype is not torch.bool:
          condition = condition.to(bool)
      return ivy.astype(
          torch.where(condition, x1, x2), x1.dtype, copy=False
      )
  
file_path: ivy/ivy/functional/backends/torch/searching.py
imports: from numbers import Number
  from typing import Optional, Tuple, Union
  import torch
  import torch.nn.functional
  import ivy
  from ivy.func_wrapper import with_unsupported_dtypes
  from .None import backend_version
label_desc: Use image node_id 4 for calling a global function with example usage: where() and returns: ivy