code: private ExtensionDependency getDependency(Extension extension, String dependencyId)
      {
          for (ExtensionDependency dependency : extension.getDependencies()) {
              if (dependency.getId().equals(dependencyId)) {
                  return dependency;
              }
          }
  
          return null;
      }
docs: Extract extension with the provided id from the provided extension.
  
  @param extension the extension
  @param dependencyId the id of the dependency
  @return the extension dependency or null if none has been found