code: def hardshrink(input, lambd=0.5):
      mask = ivy.logical_or(
          ivy.greater(input, lambd), ivy.less(input, -lambd)
      )
      return ivy.where(mask, input, 0.0)
  
imports: import ivy
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back
label_desc: Use image node_id 8 for calling a global function with example usage: hardshrink(input, lambd) and returns: ivy