code: public static ExtensionRegistry addWithDependeciesToRegistry(final FileDescriptor file,
        final ExtensionRegistry registry) {
      for (final FileDescriptor dependency : getFileWithAllDependencies(file)) {
        addToRegistry(dependency, registry);
      }
  
      return registry;
    }
docs: Adds all extensions, including dependencies, for the given FileDescriptor to the registry.