code: def clear_instances(self, instances=None):
          
          if instances is None:
              instances = self.instances[:]  # have to make a copy of the list
          for instance in instances:
              self.remove_instance(instance)
docs: Request to "remove" the given instances list or all if not provided
  
          :param instances: instances to remove (all instances are removed if None)
          :type instances:
          :return: None