code: def strip(self, inplace=False):
          
          if not inplace:
              t = self.copy()
          else:
              t = self
          for e in t._tree.preorder_edge_iter():
              e.length = None
          t._dirty = True
          return t
docs: Sets all edge lengths to None