def METHOD_NAME(ec2_client: Client, instance_id: str):
    try:
        instance = ec2_client.describe_instance_status(InstanceIds=[instance_id])
        if instance["InstanceStatuses"]:
            status = instance["InstanceStatuses"][0]["InstanceState"]["Name"]
            # see possible values at https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.describe_instance_status
            # 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            # it's unlikely that we'll ever be in this situation with a pending node - the common case is that
            # the node is either running and been marked as not ready, or it's being shutdown
            if status not in ("running", "pending"):
                return False
            return True
        log.debug(
            f"no instance status in response for {instance_id}; assuming to have been terminated"
        )
        return False
    except ClientError as e:
        if e.response["Error"]["Code"] == "InvalidInstanceID.NotFound":
            log.debug(
                f"instance {instance_id} not found; assuming to have been terminated"
            )
            return False
        else:
            log.error(f"error fetching instance status for {instance_id}")
            raise e
    return True