code: def total_weight(self):
      return sum(
          child.total_weight for child in filter(None, self.children)
      )
  
imports: from __future__ import annotations
  import abc
  import math
  from ..base import Branch
label_desc: Use image node_id 2 for calling the DTBranch obj's underlying member method code with example usage: obj.total_weight() and returns: sum