def _backup_path(target):
  """Return a path from the directory this is in to the Bazel root.

  Args:
    target: File

  Returns:
    A path of the form "../../.."
  """
  n = len(target.dirname.split("/"))

  return "/".join([".."] * n)