code: def _wrap_command(cmds, cls, strict=True):
      """Wrap a setup command
  
      Parameters
      ----------
      cmds: list(str)
          The names of the other commands to run prior to the command.
      strict: boolean, optional
          Wether to raise errors when a pre-command fails.
      """
  
      class WrappedCommand(cls):
          def run(self):
              if not getattr(self, "uninstall", None):
                  try:
                      [self.run_command(cmd) for cmd in cmds]
                  except Exception:
                      if strict:
                          raise
                      else:
                          pass
  
              update_packages(self)
  
              # update package data
              update_package_data(self.distribution)
  
              result = cls.run(self)
              return result
  
      return WrappedCommand
  
imports: from collections import defaultdict
  from os.path import join
  import io
  import os
  import functools
  import pipes
  import re
  import shlex
  import subprocess
  import sys
  from setuptools import Command
  from setuptools.command.build_py import build_py
  from setuptools.command.sdist import sdist
  from distutils import log
  from setuptools.command.develop import develop
  from setuptools.command.bdist_egg import bdist_egg
label_desc: Use image node_id 16 for calling a global function with example usage: _wrap_command(cmds, cls, strict) and returns: WrappedCommand, result