code: def is_instance_running(self, instance_id):
          
          instance = self._load_instance(instance_id)
  
          if instance.update() == "running":
              # If the instance is up&running, ensure it has an IP
              # address.
              if not instance.ip_address and self.request_floating_ip:
                  log.debug("Public ip address has to be assigned through "
                            "elasticluster.")
                  self._allocate_address(instance)
                  instance.update()
              return True
          else:
              return False
docs: Checks if the instance is up and running.
  
          :param str instance_id: instance identifier
  
          :return: bool - True if running, False otherwise