def is_external_artifact(label):
    """Determines whether a label corresponds to an external artifact."""

    # Label.EXTERNAL_PATH_PREFIX is due to change from 'external' to '..' in Bazel 0.4.5.
    # This code is for forwards and backwards compatibility.
    # Remove the 'external' check when Bazel 0.4.4 and earlier no longer need to be supported.
    return label.workspace_root.startswith("external") or label.workspace_root.startswith("..")