Returns a normalized element tag or attribute name. A tag name or attribute name can be given
  either as a string, or as a 2-tuple. If a 2-tuple, it is interpreted as (namespace, name) and is
  returned joined by a colon ":"

  :name: a string or a 2-tuple of strings

def _normalize_name(name):
  """Returns a normalized element tag or attribute name. A tag name or attribute name can be given
  either as a string, or as a 2-tuple. If a 2-tuple, it is interpreted as (namespace, name) and is
  returned joined by a colon ":"

  :name: a string or a 2-tuple of strings
  """
  if isinstance(name, tuple):
    ns, nm = name
    return "{}:{}".format(ns, nm)
  else:
    return name