def METHOD_NAME(model, dataloader, empty_logger: Logger):
    pytest.importorskip('transformers')
    from transformers import BertForMaskedLM, BertForSequenceClassification
    model = model()
    dataloader = dataloader()
    state = State(
        model=model,
        rank_zero_seed=0,
        run_name='run_name',
        device=DeviceCPU(),
        dataloader=dataloader,
        dataloader_label='train',
        max_duration='1ep',
    )
    gated_linear_units = GatedLinearUnits()
    # state.model wrapped in HuggingFaceModel wrapped
    assert isinstance(state.model.model, BertForMaskedLM) or isinstance(state.model.model,
                                                                        BertForSequenceClassification)
    gated_linear_units.apply(Event.INIT, state, empty_logger)
    assert_is_glu_instance(state.model.model)