async def METHOD_NAME(session: sa.orm.Session):
    """Registers blocks from whitelisted collections."""
    collections_blocks_data = await _load_collection_blocks_data()
    block_types = [
        block_type
        for collection in collections_blocks_data["collections"].values()
        for block_type in collection["block_types"].values()
    ]
    for block_type in block_types:
        # each block schema gets its own transaction
        async with session.begin():
            block_schemas = block_type.pop("block_schemas", [])
            block_type_id = await register_block_type(
                session=session,
                block_type=schemas.core.BlockType.parse_obj(block_type),
            )
            for block_schema in block_schemas:
                await register_block_schema(
                    session=session,
                    block_schema=schemas.core.BlockSchema.parse_obj(
                        {**block_schema, "block_type_id": block_type_id}
                    ),
                )