class_docstr: build_web command
code: def run(cls):
      if int(os.environ.get("NO_WEB_UI", "0")):
          return
  
      npm_path = shutil.which("npm")
      web_src_path = os.path.join(
          repo_root, *cls._web_src_path.split("/")
      )
      web_dest_path = os.path.join(
          repo_root, *cls._web_dest_path.split("/")
      )
  
      if not os.path.exists(web_src_path):
          return
      elif npm_path is None:
          if not os.path.exists(web_dest_path):
              warnings.warn(
                  "Cannot find NPM, may affect displaying Mars Web"
              )
          return
  
      replacements = {"npm": npm_path}
      cmd_errored = False
      for cmd in cls._commands:
          cmd = [replacements.get(c, c) for c in cmd]
          proc_result = subprocess.run(cmd, cwd=web_src_path)
          if proc_result.returncode != 0:
              warnings.warn(f'Failed when running `{" ".join(cmd)}`')
              cmd_errored = True
              break
      if not cmd_errored:
          assert os.path.exists(cls._web_dest_path)
  
imports: import os
  import platform
  import shutil
  import subprocess
  import sys
  import warnings
  from sysconfig import get_config_vars
  import numpy
  from Cython.Build import cythonize
  from pkg_resources import parse_version
  from setuptools import Command, Extension, setup
  from setuptools.command.develop import develop
  from setuptools.command.install import install
  from setuptools.command.sdist import sdist
label_desc: Use image node_id 3 for calling the BuildWeb obj's underlying member method code with example usage: obj.run(cls) without return types