<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clear(self, objtype=[]):
 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'*. """

        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