def METHOD_NAME(k2450) -> None:
    """
    If the sense function is in resistance mode, test that an error is generated
    when we change the source function
    """
    k2450.source.function("voltage")
    k2450.sense.function("resistance")
    with pytest.raises(
        RuntimeError,
        match="Cannot change the source function while sense function is in 'resistance' mode"
    ):
        k2450.source.function("current")
    k2450.sense.function("voltage")
    # after changing the sense function we should be able to change the source function
    k2450.source.function("current")