def _strip_scope(name, scope, additional_scope):
  """Returns the name with scope stripped from it."""

  if additional_scope:
    name = name.replace("{}/".format(additional_scope), "")
  if scope:
    name = name.replace("{}/".format(scope), "", 1)
  return name