def METHOD_NAME():
    s = MutableScope("top")
    # this should warn, the use of `optional=...` rather than adding a Scope object
    # when optional dependencies are wanted is deprecated
    with pytest.warns(DeprecationWarning):
        s.add_dependency("foo", optional=True)
    # confirm the str representation and repr for good measure
    assert str(s) == "top[*foo]"
    assert (
        repr(s)
        == "MutableScope('top', dependencies=[MutableScope('foo', optional=True)])"
    )