docstr: Parameters
  ----------
  g_phi : mx.np.ndarray
      Shape (batch_size, beam_size, L).
  T : mx.np.ndarray
      The previous scores. Shape (batch_size, beam_size)
  axis
      The axis
  Z
      The Z value
docstr_tok: ["Parameters","--","--","--","--","--","g_phi",":","mx.np.ndarray","Shape","(","batch_size",",","beam_size",",","L",")",".","T",":","mx.np.ndarray","The","previous","scores",".","Shape","(","batch_size",",","beam_size",")","axis","The","axis","Z","The","Z","value"]
code: def shift_gumbel_maximum(self, g_phi, T, axis=-1, Z=None):
      """
  
      Parameters
      ----------
      g_phi : mx.np.ndarray
          Shape (batch_size, beam_size, L).
      T : mx.np.ndarray
          The previous scores. Shape (batch_size, beam_size)
      axis
          The axis
      Z
          The Z value
      """
      if Z is None:
          Z = g_phi.max(axis=axis)
      T_ = mx.npx.reshape(T, (-4, 1))
      Z_ = mx.npx.reshape(Z, (-4, 1))
      u = T_ - g_phi + mx.np.log1p(-mx.np.exp(g_phi - Z_) + 1e-5)
      return T_ - mx.npx.relu(u) - mx.np.log1p(mx.np.exp(-mx.np.abs(u)))
  
imports: import warnings
  import mxnet
  import abc
  from mxnet.gluon import HybridBlock
  from typing import Callable, Optional
  from .layers import get_activation
label_desc: Use image node_id 3 for calling the _BeamSearchStepUpdate obj's underlying member method code with example usage: obj.shift_gumbel_maximum(g_phi, T, axis, Z) and returns: unknown