code: private function getInstallPath(PackageInterface $package, $global = false)
      {
          if (!$global) {
              return $this->composer->getInstallationManager()->getInstallPath($package);
          }
  
          return $this->globalComposer->getInstallationManager()->getInstallPath($package);
      }
docs: Retrieves the path a package is installed to.
  
  @param PackageInterface $package
  @param bool             $global  Whether this is a global package
  
  @return string Install path