code: def stop(self):
          
          # check that everything is running
          if not self._running or self._device is None:
              logging.warning('Kinect2 device %d not runnning. Aborting stop' %(self._device_num))
              return False
  
          # stop the device
          self._device.stop()
          self._device.close()
          self._device = None
          self._running = False
          return True
docs: Stops the Kinect2 sensor stream.
  
          Returns
          -------
          bool
              True if the stream was stopped, False if the device was already
              stopped or was not otherwise available.