code: def js_prerelease(command, strict=False):
      """Decorator for building minified js/css prior to another command."""
  
      class DecoratedCommand(command):
          """Decorated command."""
  
          def run(self):
              jsdeps = self.distribution.get_command_obj("jsdeps")
              if not is_repo and all(
                  os.path.exists(t) for t in jsdeps.targets
              ):
                  # sdist, nothing to do
                  command.run(self)
                  return
  
              try:
                  self.distribution.run_command("jsdeps")
              except Exception as e:  # pylint: disable=broad-except
                  missing = [
                      t for t in jsdeps.targets if not os.path.exists(t)
                  ]
                  if strict or missing:
                      log.warn("rebuilding js and css failed")
                      if missing:
                          log.error("missing files: %s" % missing)
                      raise e
                  else:
                      log.warn(
                          "rebuilding js and css failed (not a problem)"
                      )
                      log.warn(str(e))
              command.run(self)
              update_package_data(self.distribution)
  
      return DecoratedCommand
  
imports: from distutils import log
  from distutils import spawn
  import os
  import platform
  import subprocess
  import sys
  from setuptools import Command
  from setuptools import find_packages
  from setuptools import setup
  from setuptools.command.build_py import build_py
  from setuptools.command.develop import develop
  from setuptools.command.egg_info import egg_info
  from setuptools.command.sdist import sdist
label_desc: Use image node_id 3 for calling a global function with example usage: js_prerelease(command, strict) and returns: DecoratedCommand