def registry(root, access=Registry.DEFAULT_ACCESS, accept_value=True):
    if root is None:
        return None
    elif isinstance(root, Registry):
        return root
    elif isinstance(root, basestring):
        return Registry.from_string(root, access=access, accept_value=accept_value)
    else:
        raise x_registry(errctx="registry", errmsg="root must be None, an existing key or a moniker")
Factory function for the Registry class.
dataset/ETHPy150Open tjguk/winsys/winsys/registry.py/registry