Generate an LSID domain based off a setting file or the hostname
        :return: string

def _generate_domain():
        """
        Generate an LSID domain based off a setting file or the hostname
        :return: string
        """

        # Check for LSID domain setting file
        try:
            user_dir = str(pathlib.Path.home())
            jupyter_dir = os.path.join(user_dir, '.jupyter')
            domain_path = os.path.join(jupyter_dir, 'lsid_domain')
            with open(domain_path, 'r') as domain_file:
                domain = str(domain_file.read()).strip()
            if domain is not None and domain != '':
                return domain
        except:
            # Ignore exceptions, simply fall back to the domain name
            pass

        # If this fails, return the fully qualified domain name
        return socket.getfqdn()