code: def check_js_build_status(version, root=None, srcdir=None):
      """Check the javascript build status.
  
      Summary:
      - if we're not in the git repo, or if the source directory doesn't exist,
        then do nothing.
      - if the JS libraries do not exist, return an error with a message about
        building them.
      - if the JS sources have been modified, return a warning with a message
        about how to use them to build the libraries.
      """
      if root is None:
          root = os.path.dirname(os.path.abspath(__file__))
  
      if srcdir is None:
          srcdir = os.path.join(root, "src")
  
      # If we're not in the git repo, then we perform no checks
      if not is_repo(root):
          return
  
      # If the source directory doesn't exist, then perform no checks
      # (this is the case in the packaged distribution)
      if not os.path.exists(srcdir):
          return
  
      # these are the built javascript libraries
      js_libs = [
          os.path.join(root, "mpld3", "js", lib.format(version))
          for lib in ("mpld3.v{0}.js", "mpld3.v{0}.min.js")
      ]
  
      # if the js libraries don't exist, then throw an error
      if not all(os.path.exists(lib) for lib in js_libs):
          raise ValueError(VERSION_ERROR.format(version))
  
      # these are the javascript sources
      js_sources = [os.path.join(root, "package.json")]
      for directory, subdirs, flist in os.walk(srcdir):
          js_sources.extend(
              [
                  os.path.join(directory, f)
                  for f in flist
                  if f.endswith(".js")
              ]
          )
  
      # if it looks like the sources have been modified, then warn that
      # they should be rebuilt
      last_modified_src = max([os.stat(f).st_mtime for f in js_sources])
      first_modified_lib = min([os.stat(f).st_mtime for f in js_libs])
  
      if last_modified_src > first_modified_lib:
          warnings.warn(BUILD_WARNING)
  
imports: import os
  import subprocess
  import sys
  import warnings
  import shutil
label_desc: Use image node_id 8 for calling a global function with example usage: check_js_build_status(version, root, srcdir) without return types