def METHOD_NAME(salt_ssh_cli, grains_filter_by_lookup):
    """
    test grains.filter_by with salt-ssh
    """
    ret = salt_ssh_cli.run(
        "grains.filter_by",
        grains_filter_by_lookup,
        grain="os",
        merge=grains_filter_by_lookup["merge"],
        base="common",
        default="custom_default",
    )
    assert ret.returncode == 0
    assert ret.data
    assert "has_common" in ret.data
    assert "filtered" in ret.data
    assert "merged" in ret.data
    assert "defaulted" not in ret.data