code: def is_instance_running(self, instance_id):
          
          items = self.list_instances(filter=('name eq "%s"' % instance_id))
          for item in items:
              if item['status'] == 'RUNNING':
                  return True
          return False
docs: Check whether the instance is up and running.
  
          :param str instance_id: instance identifier
          :reutrn: True if instance is running, False otherwise