code: def html_id_ok(objid, html5=False):
      """Check whether objid is valid as an HTML id attribute.
  
      If html5 == True, then use the more liberal html5 rules.
      """
      if html5:
          return not re.search(r"\s", objid)
      else:
          return bool(
              re.match(r"^[a-zA-Z][a-zA-Z0-9\-\.\:\_]*$", objid)
          )
  
file_path: pyLDAvis/notebooks/pyLDAvis/utils.py
imports: import json
  import os
  import re
  import shutil
  import warnings
  import numpy
  import pyLDAvis.urls
label_desc: Use image node_id 1 for calling a global function with example usage: html_id_ok(objid, html5) and returns: unknown, bool