code: @Override
      protected void analyzeDependency(Dependency dependency, Engine engine)
              throws AnalysisException {
          dependency.setEcosystem(DEPENDENCY_ECOSYSTEM);
          final File file = dependency.getActualFile();
          final File parent = file.getParentFile();
          final String parentName = parent.getName();
          if (INIT_PY_FILTER.accept(file)) {
              //by definition, the containing folder of __init__.py is considered the package, even the file is empty:
              //"The __init__.py files are required to make Python treat the directories as containing packages"
              //see section "6.4 Packages" from https://docs.python.org/2/tutorial/modules.html;
              dependency.addEvidence(EvidenceType.PRODUCT, file.getName(), "PackageName", parentName, Confidence.HIGHEST);
              dependency.setName(parentName);
  
              final File[] fileList = parent.listFiles(PY_FILTER);
              if (fileList != null) {
                  for (final File sourceFile : fileList) {
                      analyzeFileContents(dependency, sourceFile);
                  }
              }
          } else {
              engine.removeDependency(dependency);
          }
      }
docs: Analyzes python packages and adds evidence to the dependency.
  
  @param dependency the dependency being analyzed
  @param engine the engine being used to perform the scan
  @throws AnalysisException thrown if there is an unrecoverable error
  analyzing the dependency