public List<Task> tasksForInstance(ContainerInstance instance) {
    String arn = instance.getArn();

    if (instancesByInstanceArn.containsKey(arn)) {
      return tasksByInstanceArn.getOrDefault(arn, Collections.emptyList());
    } else {
      throw new IndexOutOfBoundsException(
          String.format("ContainerInstance with ARN %s not found in snapshot", arn));
    }
  }
Wrapper around {@link ClusterSnapshot} that indexes Tasks by ContainerInstance.
scheduling-manager/src/main/java/com/amazonaws/blox/scheduling/scheduler/engine/daemon/ClusterSummary.java