docs: def edge_length_sum(self, terminal=True, internal=True):
          '''Compute the sum of all selected edge lengths in this ``Tree``
  
          Args:
              ``terminal`` (``bool``): ``True`` to include terminal branches, otherwise ``False``
  
              ``internal`` (``bool``): ``True`` to include internal branches, otherwise ``False``
  
          Returns:
              ``float``: Sum of all selected edge lengths in this ``Tree``
          '''
          if not isinstance(terminal, bool):
              raise TypeError("leaves must be a bool")
          if not isinstance(internal, bool):
              raise TypeError("internal must be a bool")
          return sum(node.edge_length for node in self.traverse_preorder() if node.edge_length is not None and ((terminal and node.is_leaf()) or (internal and not node.is_leaf())))