def METHOD_NAME(mock_packages, capfd):
    with capfd.disabled():
        out = split(maintainers("--all", "--by-user"))
    assert out == [
        "adamjstewart:",
        "py-extension1,",
        "py-extension2",
        "user0:",
        "maintainers-3",
        "user1:",
        "maintainers-1,",
        "maintainers-3,",
        "py-extension1",
        "user2:",
        "maintainers-1,",
        "maintainers-2,",
        "maintainers-3,",
        "py-extension1",
        "user3:",
        "maintainers-2,",
        "maintainers-3",
    ]
    with capfd.disabled():
        out = split(maintainers("--all", "--by-user", "user1", "user2"))
    assert out == [
        "user1:",
        "maintainers-1,",
        "maintainers-3,",
        "py-extension1",
        "user2:",
        "maintainers-1,",
        "maintainers-2,",
        "maintainers-3,",
        "py-extension1",
    ]