Generate an LSID namespace based off Jupyter user or system user
        :return: string

def _generate_namespace():
        """
        Generate an LSID namespace based off Jupyter user or system user
        :return: string
        """
        raw_namespace = None

        # Get the Jupyter user, if available
        try:
            raw_namespace = os.environ['JPY_USER']
        except KeyError:
            pass

        # Otherwise get the current user
        if raw_namespace is None or raw_namespace == '':
            raw_namespace = getpass.getuser()

        # Remove illegal characters and return
        return re.sub(r'[^\w.-]', '-', raw_namespace)