code: def hardshrink(x, threshold=0.5, name=None):
      mask = ivy.logical_or(
          ivy.greater(x, threshold), ivy.less(x, -threshold)
      )
      return ivy.where(mask, x, 0.0)
  
imports: import ivy
  from ivy.func_wrapper import with_supported_dtypes
  from ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back
  from ivy.functional.frontends.paddle.tensor.math import tanh
label_desc: Use image node_id 6 for calling a global function with example usage: hardshrink(x, threshold, name) and returns: ivy