code: def remove_object(self, key):
          '''remove an object by key from all layers'''
          state = self.state
          for layer in state.layers:
              state.layers[layer].pop(key, None)
          state.need_redraw = Truf remove_object(self, key):
          '''remove an object by key from all layers'''
          state = self.state
          for layer in state.layers:
              state.layers[layer].pop(key, None)
          state.need_redraw = True
docs: remove an object by key from all layers