stop the container

def stop(self):
        """
        stop the container
        """
        logger.info('is being stopped', extra={'formatter': 'container', 'container': self.name})
        response = self.client.stop(self.id)

        while self.state()['running']:
            time.sleep(1)

        return response