protected function getMultiRepositoryPath($path)
    {
        if ($this->isPathOfMultiRepository($path)) {
            return $path;
        }
        $packageDir = pathinfo($path, PATHINFO_BASENAME);
        if (!strpos($packageDir, self::MULTI_REPO_DELIMITER)) {
            //package cannot be used in multi-repo
            return null;
        }

        $this->defaultPath = $path;
        $arr = explode(self::MULTI_REPO_DELIMITER, $packageDir);
        $baseName = array_shift($arr);

        $customDir = $this->getParentMultiRepoDir();

        if ($customDir) {
            //get vendor name
            $vendor = pathinfo(dirname($path), PATHINFO_BASENAME);
            //get path based upon custom parent dir
            $newPath = $customDir . DIRECTORY_SEPARATOR . $vendor . DIRECTORY_SEPARATOR
                       . $baseName . self::MULTI_REPO_DIRECTORY_SUFFIX;
            if ($this->io->isVeryVerbose()) {
                $this->io->write('    Multi-repository custom path found.');
            }
        } else {
            //make full path to new general multi-repo directory
            $newPath = str_replace(
                $packageDir,
                $baseName . self::MULTI_REPO_DIRECTORY_SUFFIX, //make repo dir name
                $path
            );
            if ($this->io->isVeryVerbose()) {
                $this->io->write('    Multi-repository path will be within the current vendor directory.');
            }
        }
        $this->filesystem->ensureDirectoryExists($newPath);
        return $newPath;
    }