import re


def strip_namespace(path):
  """Removes namespace prefixes from elements of the supplied path.

  Args:
    path: A YANG path string

  Returns:
    A YANG path string with the namespaces removed.
  """
  re_ns = re.compile(r"^.+:")
  path_components = [re_ns.sub("", comp) for comp in path.split("/")]
  pathstr = "/".join(path_components)
  return pathstr