docstr: sums is a property we derive from `placements` of the
  distributed tensor. It simply return a list of ints where
  sums[i] denotes the pending sum (partial) on mesh dim i
docstr_tok: ["sums","is","a","property","we","derive","from","`","placements","`","of","the","distributed","tensor",".","It","simply","return","a","list","of","ints","where","sums","[","i","]","denotes","the","pending","sum","(","partial",")","on","mesh","dim","i"]
code: def sums(self) -> List[int]:
      """
      sums is a property we derive from `placements` of the
      distributed tensor. It simply return a list of ints where
      sums[i] denotes the pending sum (partial) on mesh dim i
      """
      return [
          idx
          for idx, placement in enumerate(self.placements)
          if placement.is_partial()
      ]
  
imports: from dataclasses import dataclass
  from typing import Any, cast, List, NamedTuple, Optional, Tuple
  import torch
  import torch.distributed._functional_collectives
  import torch.distributed.distributed_c10d
  from torch.distributed._tensor._collective_utils import mesh_broadcast, mesh_scatter
  from torch.distributed.device_mesh import DeviceMesh
label_desc: Use image node_id 13 for calling the DTensorSpec obj's underlying member method code with example usage: obj.sums() and returns: unknown