code: def gumbel_softmax(
      x, temperature=1.0, hard=False, axis=-1, name=None
  ):
      gumbel_noice = -ivy.log(
          -ivy.log(ivy.random_uniform(ivy.shape(x) + 1e-20) + 1e-20)
      )
      gumbel_logits = (x + gumbel_noice) / temperature
      y_soft = ivy.softmax(gumbel_logits, axis=axis)
  
      if hard:
          y_hard = ivy.one_hot(
              ivy.argmax(y_soft, axis=axis), ivy.shape(y_soft)[axis]
          )
          return y_hard
      else:
          return y_soft
  
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 5 for calling a global function with example usage: gumbel_softmax(x, temperature, hard, axis, name) and returns: y_hard, y_soft