def METHOD_NAME(level, blocks, LevelBlock, Block):
    """Helper method creating LevelBlock objects given a list of blocks in dictionary form."""
    LevelBlock.objects.filter(level=level).delete()
    level_blocks = []
    dictionary = blocks_dictionary(blocks, Block)
    for data in blocks:
        level_blocks.append(
            LevelBlock(
                level_id=level.id,
                type=dictionary[data["type"]],
                number=data["number"] if "number" in data else None,
            )
        )
    LevelBlock.objects.bulk_create(level_blocks)