code: def clear(self, objtype=[]):
          r
          if len(objtype) == 0:
              super().clear()
          else:
              names = [obj.name for obj in self]
              for name in names:
                  try:
                      obj = self[name]
                      for t in objtype:
                          if obj._isa(t):
                              self.purge_object(obj)
                  except KeyError:
                      pass
docs: r"""
          Clears objects from the project entirely or selectively, depdening on
          the received arguments.
  
          Parameters
          ----------
          objtype : list of strings
              A list containing the object type(s) to be removed.  If no types
              are specified, then all objects are removed.  To clear only objects
              of a specific type, use *'network'*, *'geometry'*, *'phase'*,
              *'physics'*, or *'algorithm'*.  It's also possible to use
              abbreviations, like *'geom'*.