code: def copysign(
      x1: Union[torch.Tensor, Number],
      x2: Union[torch.Tensor, Number],
      /,
      *,
      out: Optional[torch.Tensor] = None,
  ) -> torch.Tensor:
      x1, x2 = promote_types_of_inputs(x1, x2)
      if not ivy.is_float_dtype(x1):
          x1 = x1.type(ivy.default_float_dtype(as_native=True))
          x2 = x2.type(ivy.default_float_dtype(as_native=True))
      return torch.copysign(torch.as_tensor(x1), x2, out=out)
  
imports: from typing import Optional, Union, Tuple, List, Sequence
  from numbers import Number
  import torch
  import ivy
  from ivy import promote_types_of_inputs
  from ivy.functional.backends.torch.elementwise import _cast_for_unary_op
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  from ..None import backend_version
label_desc: Use image node_id 7 for calling a global function with example usage: copysign() and returns: torch