def METHOD_NAME(minimal_state: State, model_cls, model_params, replace_convs, replace_linears):
    model = model_cls(*model_params)
    state = create_state(minimal_state, model)
    if (isinstance(model, SimpleTransformerClassifier) or isinstance(model, HuggingFaceModel)) and replace_convs:
        pytest.skip('Skipping: NLP models do not contain conv layers.')
    algo_instance = create_algo_instance(replace_convs, replace_linears)
    logger_mock = Mock()
    algo_instance.apply(Event.INIT, state, logger=logger_mock)
    factorize_convs = algo_instance.factorize_convs
    factorize_linears = algo_instance.factorize_linears
    mock_obj = logger_mock.log_hyperparameters
    if factorize_convs:
        num_factorized_convs = module_surgery.count_module_instances(state.model, FactorizedConv2d)
        mock_obj.assert_any_call({LOG_NUM_CONV2D_REPLACEMENTS_KEY: num_factorized_convs})
    if factorize_linears:
        num_factorized_linears = module_surgery.count_module_instances(state.model, FactorizedLinear)
        mock_obj.assert_any_call({LOG_NUM_LINEAR_REPLACEMENTS_KEY: num_factorized_linears})
    target_count = 0
    target_count += 1 if factorize_convs else 0
    target_count += 1 if factorize_linears else 0
    assert mock_obj.call_count == target_count