code: def stop_instance(self, instance_id):
          
          instance = self._load_instance(instance_id)
          instance.terminate()
          del self._instances[instance_id]
docs: Stops the instance gracefully.
  
          :param str instance_id: instance identifier