code: def TempMax(alpha):
      class _TempMax(_BaseLog):
          """
          Implements a max forward, hot softmax backward.
          """
  
          @staticmethod
          def sum(xs, dim=-1):
              pass
  
          @staticmethod
          def sparse_sum(xs, dim=-1):
              m, _ = torch.max(xs, dim=dim)
              a = torch.softmax(alpha * xs, dim)
              return m, (torch.zeros(a.shape[:-1]).long(), a)
  
      return _TempMax
  
imports: import torch
label_desc: Use image node_id 3 for calling a global function with example usage: TempMax(alpha) and returns: _TempMax, m,  torch,  a