'Convert an input value into the internally used values of
this object
@param namespace: The string or constant to convert
@type namespace: str or unicode or BARE_NS or OPENID_NS'

def _fixNS(self, namespace):

    if (namespace == OPENID_NS):
        if (self._openid_ns_uri is None):
            raise UndefinedOpenIDNamespace('OpenID    namespace    not    set')
        else:
            namespace = self._openid_ns_uri
    if ((namespace != BARE_NS) and (type(namespace) not in [str, unicode])):
        raise TypeError(('Namespace    must    be    BARE_NS,    OPENID_NS    or    a    string.    got    %r' % (namespace,)))
    if ((namespace != BARE_NS) and (':' not in namespace)):
        fmt = 'OpenID    2.0    namespace    identifiers    SHOULD    be    URIs.    Got    %r'
        warnings.warn((fmt % (namespace,)), DeprecationWarning)
        if (namespace == 'sreg'):
            fmt = 'Using    %r    instead    of    "sreg"    as    namespace'
            warnings.warn((fmt % (SREG_URI,)), DeprecationWarning)
            return SREG_URI
    return namespace
