def get_group_pillow(pillow_id='group-pillow'):
    checkpoint = PillowCheckpoint(
        pillow_id,
    )
    processor = ElasticProcessor(
        elasticsearch=get_es_new(),
        index_info=GROUP_INDEX_INFO,
    )
    return ConstructedPillow(
        name=pillow_id,
        checkpoint=checkpoint,
        change_feed=KafkaChangeFeed(topics=[GROUP], group_id='groups-to-es'),
        processor=processor,
        change_processed_event_handler=PillowCheckpointEventHandler(
            checkpoint=checkpoint, checkpoint_frequency=100,
        ),
    )
This pillow adds users from xform submissions that come in to the User Index if they don't exist in HQ
dataset/ETHPy150Open dimagi/commcare-hq/corehq/pillows/group.py/get_group_pillow