code: def remove_sensor(self, sensor):
          
          if isinstance(sensor, basestring):
              sensor_name = sensor
          else:
              sensor_name = sensor.name
          sensor = self._sensors.pop(sensor_name)
  
          def cancel_sensor_strategies():
              for conn_strategies in self._strategies.values():
                  strategy = conn_strategies.pop(sensor, None)
                  if strategy:
                      strategy.cancel()
          self.ioloop.add_callback(cancel_sensor_strategies)
docs: Remove a sensor from the device.
  
          Also deregisters all clients observing the sensor.
  
          Parameters
          ----------
          sensor : Sensor object or name string
              The sensor to remove from the device server.