code: private static List<Tuple> tuplesResult(EntityKey[] keys, Object[] searchObjects, TupleContext tupleContext, MongoCursor<Document> cursor) {
  		// The list is initialized with null because some keys might not have a corresponding value in the cursor
  		Tuple[] tuples = new Tuple[searchObjects.length];
  		while ( cursor.hasNext() ) {
  			Document document = cursor.next();
  			for ( int i = 0; i < searchObjects.length; i++ ) {
  				if ( document.get( ID_FIELDNAME ).equals( searchObjects[i] ) ) {
  					tuples[i] = createTuple( keys[i], tupleContext, document );
  					// We assume there are no duplicated keys
  					break;
  				}
  			}
  		}
  		return Arrays.asList( tuples );
  	}
docs: /*
  This method assumes that the entries in the cursor might not be in the same order as the keys and some keys might
  not have a matching result in the db.