class_docstr: * Check for previously-installed version before installing
  * Set version string in __init__ after building. This helps to ensure that we
    know when an installation came from a non-release code base.
code: def run(self):
      global path, version, initVersion, forcedVersion, installVersion
  
      name = self.config_vars["dist_name"]
      path = os.path.join(self.install_libbase, "pyqtgraph")
      if os.path.exists(path):
          raise Exception(
              "It appears another version of %s is already "
              "installed at %s; remove this before installing."
              % (name, path)
          )
      print("Installing to %s" % path)
      rval = install.install.run(self)
  
      # If the version in __init__ is different from the automatically-generated
      # version string, then we will update __init__ in the install directory
      if initVersion == version:
          return rval
  
      try:
          initfile = os.path.join(path, "__init__.py")
          with open(initfile, "r") as file_:
              data = file_.read()
          with open(initfile, "w") as file_:
              file_.write(
                  re.sub(
                      r"__version__ = .*",
                      "__version__ = '%s'" % version,
                      data,
                  )
              )
          installVersion = version
      except:
          sys.stderr.write(
              "Warning: Error occurred while setting version string in build path. "
              "Installation will use the original version string "
              "%s instead.\n" % (initVersion)
          )
          if forcedVersion:
              raise
          installVersion = initVersion
          sys.excepthook(*sys.exc_info())
  
      return rval
  
file_path: pyqtgraph/setup.py
imports: import distutils.dir_util
  import os
  import re
  import sys
  from distutils.command import build
  from setuptools import find_namespace_packages, setup
  from setuptools.command import install
  import tools.setupHelpers
label_desc: Use image node_id 1 for calling the Install obj's underlying member method code with example usage: obj.run() and returns: rval, rval