def METHOD_NAME(instrument: DummyInstrument) -> None:
    test_value = 5
    initial_gain = 2
    variable_gain_name = 'gain'
    gain = ManualParameter(name=variable_gain_name,
                           initial_value=initial_gain)
    instrument.scaler.gain = gain
    instrument.scaler(test_value)
    assert instrument.scaler() == test_value
    assert instrument.target_parameter() == test_value / initial_gain
    assert instrument.scaler.division == 1/initial_gain
    second_gain = 7
    gain(second_gain)
    # target value must change on scaler value change, not on gain/division
    assert instrument.target_parameter() == test_value / initial_gain
    instrument.scaler(test_value)
    assert instrument.target_parameter() == test_value / second_gain
    assert instrument.scaler.division == 1 / second_gain
    assert instrument.scaler.metadata['variable_multiplier'] == variable_gain_name