code: def hardshrink(
      x: paddle.Tensor,
      /,
      *,
      lambd: float = 0.5,
      out: Optional[paddle.Tensor] = None,
  ) -> paddle.Tensor:
      if x.dtype in [paddle.float32, paddle.float64]:
          return F.hardshrink(x, threshold=lambd)
      if paddle.is_complex(x):
          return paddle.complex(
              F.hardshrink(x.real(), threshold=lambd),
              F.hardshrink(x.img(), threshold=lambd),
          )
      return F.hardshrink(x.cast("float32"), threshold=lambd).cast(
          x.dtype
      )
  
file_path: ivy/ivy/functional/backends/paddle/experimental/activations.py
imports: from typing import Optional, Union, Literal
  import paddle
  import paddle.nn.functional
  import ivy.functional.backends.paddle
  from ivy.func_wrapper import with_unsupported_device_and_dtypes, with_supported_dtypes, with_supported_device_and_dtypes
  from .None import backend_version
label_desc: Use image node_id 14 for calling a global function with example usage: hardshrink() and returns: F, F, paddle