def nsname(xmlns):
    """
	If ``xmlns`` is a module, return ``xmlns.xmlns``, else return
	``xmlns`` unchanged.
	"""
    if xmlns is not None and not isinstance(xmlns, str):
        xmlns = xmlns.xmlns
    return xmlns
