Removes a behaviour from the agent.
        The behaviour is first killed.

        Args:
          behaviour (spade.behaviour.CyclicBehaviour): the behaviour instance to be removed
429247
def remove_behaviour(self, behaviour):
        
        if not self.has_behaviour(behaviour):
            raise ValueError("This behaviour is not registered")
        index = self.behaviours.index(behaviour)
        self.behaviours[index].kill()
        self.behaviours.pop(index)
442913
private void suppressBehavior(Node behaviorValue, Node reportNode) {
    if (behaviorValue == null) {
      compiler.report(JSError.make(reportNode, PolymerPassErrors.POLYMER_UNQUALIFIED_BEHAVIOR));
      return;
    }

    if (behaviorValue.isArrayLit()) {
      for (Node child : behaviorValue.children()) {
        suppressBehavior(child, behaviorValue);
      }
    } else if (behaviorValue.isObjectLit()) {
      stripPropertyTypes(behaviorValue);
      addBehaviorSuppressions(behaviorValue);
    }
  }
156916
def remove_listener(self, listener):
        
        self.logger.debug('discarding listener %r', listener)
        with self._lock:
            self._listeners.discard(listener)
1213778
def delete_policy(self, policy):
        
        return self.manager.delete_policy(scaling_group=self, policy=policy)
1025591
def destroy(self):
        
        self._teardown_features()
        focus_registry.unregister(self.widget)
        widget = self.widget
        if widget is not None:
            del self.widget
        super(QtGraphicsItem, self).destroy()
        # If a QWidgetAction was created for this widget, then it has
        # taken ownership of the widget and the widget will be deleted
        # when the QWidgetAction is garbage collected. This means the
        # superclass destroy() method must run before the reference to
        # the QWidgetAction is dropped.
        del self._widget_action
91003
def destroy(self):
        
        if not self.id:
            return
        client.delete('/classes/{0}/{1}'.format(self._class_name, self.id), self._flags)
955992
def delete(self, callback=None, errback=None):
        
        return self._rest.delete(self.id, callback=callback, errback=errback)
583050
public void removeListener(BaseListener theBehavior, boolean bFreeBehavior)
    {
        if (m_listener != null)
        {
            if (m_listener == theBehavior)
            {
                m_listener = (FileListener)theBehavior.getNextListener();
                theBehavior.unlink(bFreeBehavior);      // remove theBehavior from the linked list
            }
            else
                m_listener.removeListener(theBehavior, bFreeBehavior);
        }
    }
672422
synchronized void remove(ConsumerSessionImpl consumer)
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "remove", consumer );
      
    _consumers.remove(new Long(consumer.getIdInternal()));
    
    if (tc.isEntryEnabled())
      SibTr.exit(tc, "remove");    
  }
1300545
async def removeKeyPair(self, *args, **kwargs):
        

        return await self._makeApiCall(self.funcinfo["removeKeyPair"], *args, **kwargs)
1020584
def off(self, name, callback, once=False):
        

        if name not in self.event_listeners:
            return

        self.event_listeners[name].remove((callback, once))
14477
def del_instance(self, obj):
        
        to_remove = set()
        for wrkey, _obj in self.iter_instances():
            if obj is _obj:
                to_remove.add(wrkey)
        for wrkey in to_remove:
            del self[wrkey]
240378
def remove_handler(self, handler):
        
        super(Session, self).remove_handler(handler)

        self.promote()
        self.stop_heartbeat()
1317391
async def delete(self):
        
        if self.is_channel:
            await self._client(functions.channels.LeaveChannelRequest(
                self.input_entity))
        else:
            if self.is_group:
                await self._client(functions.messages.DeleteChatUserRequest(
                    self.entity.id, types.InputPeerSelf()))
            await self._client(functions.messages.DeleteHistoryRequest(
                self.input_entity, 0))
695567
def _remove_session_callback(self, callback_obj, originator):
        ''' 

        '''
        try:
            callback_objs = [callback_obj]
            self._session_callbacks.remove(callback_obj)
            for cb, cb_objs in list(self._callback_objs_by_callable[originator].items()):
                try:
                    cb_objs.remove(callback_obj)
                    if not cb_objs:
                        del self._callback_objs_by_callable[originator][cb]
                except KeyError:
                    pass
        except KeyError:
            raise ValueError("callback already ran or was already removed, cannot be removed again")
        # emit event so the session is notified and can remove the callback
        for callback_obj in callback_objs:
            self._trigger_on_change(SessionCallbackRemoved(self, callback_obj))
917749
def unbind(self, callback: typing.Union[typing.Callable, AbstractFilter]):
        
        for record in self._registered:
            if record.callback == callback:
                self._registered.remove(record)
1071229
def registerBehavior(behavior, name=None, default=False, id=None):
    
    if not name:
        name = behavior.name.upper()
    if id is None:
        id = behavior.versionString
    if name in __behaviorRegistry:
        if default:
            __behaviorRegistry[name].insert(0, (id, behavior))
        else:
            __behaviorRegistry[name].append((id, behavior))
    else:
        __behaviorRegistry[name] = [(id, behavior)]