private InputIterable nodes( final long randomSeed, final long count, int batchSize, final InputIdGenerator inputIdGenerator, final IdGroupDistribution groups ) { return () -> new GeneratingInputIterator<>( count, batchSize, new RandomsStates( randomSeed ), ( randoms, visitor, id ) -> { Object nodeId = inputIdGenerator.nextNodeId( randoms, id ); Group group = groups.groupOf( id ); visitor.id( nodeId, group ); randomProperties( randoms, uniqueId( group, nodeId ), visitor ); visitor.labels( randoms.selection( TOKENS, 0, TOKENS.length, true ) ); }, 0 ); }