async _getCodeDir(codePath) {
    const stats = await fs.stat(codePath);
    if (stats.isFile()) {
      return path.dirname(codePath);
    }
    return codePath;
  }
Return the parent directory of the code.

@param codePath the path of the code.
@returns {Promise.<*>}
@private