code: def where(condition, input=None, other=None):
      if not ivy.exists(input) and not ivy.exists(other):
          return nonzero(condition, as_tuple=True)
      input, other = torch_frontend.promote_types_of_torch_inputs(
          input, other
      )
      return ivy.where(condition, input, other)
  
imports: import ivy
  from ivy.func_wrapper import with_unsupported_dtypes
  from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back, numpy_to_torch_style_args, to_ivy_shape
  import ivy.functional.frontends.torch
label_desc: Use image node_id 42 for calling a global function with example usage: where(condition, input, other) and returns: ivy, nonzero