class_docstr: Implements the max semiring (max, +, -inf, 0).
  
  Gradients give argmax.
code: def sparse_sum(xs, dim=-1):
      m, a = torch.max(xs, dim=dim)
      return m, (torch.zeros(a.shape).long(), a)
  
imports: import torch
label_desc: Use image node_id 3 for calling the MaxSemiring obj's underlying member method code with example usage: obj.sparse_sum(xs, dim) and returns: m,  torch,  a