code: function getNamespace(file, path) {
    const files = namespaces.filter(ns => ns.meta.filename === file && ns.meta.path === path);
    if (files.length > 0) {
      return files[files.length - 1];
    }
  
    const paths = namespaces.filter(ns => isIndex(ns.meta.filename) && isParent(ns.meta.path, path));
    if (paths.length > 0) {
      paths.sort((ns1, ns2) => ns1.meta.path.length - ns2.meta.path.length);
      return paths[paths.length - 1];
    }
  
    return null;
  }
docs: Get closest namespace doclet previously parsed either from the same file as the doclet
  or from one of the index.js files present in the same directory or any of its parents
  
  @param {string} file - File name of the doclet
  @param {string} path - Directory path of the doclet
  @return {?Doclet} - Namespace doclet or null