code: func (b *Backend) getStates(taskUUIDs ...string) ([]*tasks.TaskState, error) {
  	states := make([]*tasks.TaskState, 0, len(taskUUIDs))
  	cur, err := b.tasksCollection.Find(context.Background(), bson.M{"_id": bson.M{"$in": taskUUIDs}})
  	if err != nil {
  		return nil, err
  	}
  	defer cur.Close(context.Background())
  
  	for cur.Next(context.Background()) {
  		state := &tasks.TaskState{}
  		if err := cur.Decode(state); err != nil {
  			return nil, err
  		}
  		states = append(states, state)
  	}
  	if cur.Err() != nil {
  		return nil, err
  	}
  	return states, nil
  }
docs: // getStates returns multiple task states