code: def _needs_build(obj, cc_args, extra_postargs, pp_opts):
      """
      Check if an objects needs to be rebuild based on its dependencies
  
      Parameters
      ----------
      obj : str
          object file
  
      Returns
      -------
      bool
      """
      # defined in unixcompiler.py
      dep_file = obj + ".d"
      if not os.path.exists(dep_file):
          return True
  
      # dep_file is a makefile containing 'object: dependencies'
      # formatted like posix shell (spaces escaped, \ line continuations)
      # the last line contains the compiler commandline arguments as some
      # projects may compile an extension multiple times with different
      # arguments
      with open(dep_file, "r") as f:
          lines = f.readlines()
  
      cmdline = _commandline_dep_string(
          cc_args, extra_postargs, pp_opts
      )
      last_cmdline = lines[-1]
      if last_cmdline != cmdline:
          return True
  
      contents = "".join(lines[:-1])
      deps = [
          x
          for x in shlex.split(contents, posix=True)
          if x != "\n" and not x.endswith(":")
      ]
  
      try:
          t_obj = os.stat(obj).st_mtime
  
          # check if any of the dependencies is newer than the object
          # the dependencies includes the source used to create the object
          for f in deps:
              if os.stat(f).st_mtime > t_obj:
                  return True
      except OSError:
          # no object counts as newer (shouldn't happen if dep_file exists)
          return True
  
      return False
  
imports: from __future__ import division, absolute_import, print_function
  import os
  import re
  import sys
  import types
  import shlex
  import time
  import subprocess
  from copy import copy
  from distutils import ccompiler
  from distutils.ccompiler import *
  from distutils.errors import DistutilsExecError, DistutilsModuleError, DistutilsPlatformError, CompileError
  from distutils.sysconfig import customize_compiler
  from distutils.version import LooseVersion
  from numpy.distutils import log
  from numpy.distutils.compat import get_exception
  from numpy.distutils.exec_command import filepath_from_subprocess_output, forward_bytes_to_stdout
  from numpy.distutils.misc_util import cyg2win32, is_sequence, mingw32, get_num_build_jobs, _commandline_dep_string
label_desc: Use image node_id 1 for calling a global function with example usage: _needs_build(obj, cc_args, extra_postargs, pp_opts) and returns: False, True, True, True, True