class_docstr: Base semiring class.
  
  Based on description in:
  
  * Semiring parsing :cite:`goodman1999semiring`
docstr: Sum over *dim* of tensor.
docstr_tok: ["Sum","over","*","dim","*","of","tensor","."]
code: def sum(xs, dim=-1):
      "Sum over *dim* of tensor."
      raise NotImplementedError()
  
imports: import torch
label_desc: Use image node_id 8 for calling the Semiring obj's underlying member method code with example usage: obj.sum(xs, dim) without return types