def _get_all_deps(*, deps, split_deps_keys = []):
    """Returns a list of all dependencies from a Label list and optional split attribute keys.

    Args:
        deps: Label list of (split) dependencies to traverse.
        split_deps_keys: (optional) List of split attribute keys to use on split deps.

    Returns:
        List of all dependencies. If split_deps_keys is not provided, return deps.
    """
    if type(deps) == "list":
        return deps

    if not split_deps_keys:
        return deps.values()

    all_deps = []
    for split_deps_key in split_deps_keys:
        all_deps += deps[split_deps_key]
    return all_deps