def METHOD_NAME(instances):
    if not isinstance(instances, (tuple, list)):
        instances = [instances]
    current_instances = HostContext.get_instances()
    for instance in instances:
        instance_id = instance.data["instance_id"]
        found_idx = None
        for idx, _instance in enumerate(current_instances):
            if instance_id == _instance["instance_id"]:
                found_idx = idx
                break
        if found_idx is not None:
            current_instances.pop(found_idx)
    HostContext.save_instances(current_instances)