presto-main/src/main/java/io/prestosql/execution/scheduler/TopologyAwareNodeSelectorModule.java/TopologyAwareNodeSelectorModule/bindNetworkTopology
class TopologyAwareNodeSelectorModule:    private void bindNetworkTopology()
    {
        install(installModuleIf(
                TopologyAwareNodeSelectorConfig.class,
                config -> config.getType() == FLAT,
                binder -> binder.bind(NetworkTopology.class).to(FlatNetworkTopology.class).in(Scopes.SINGLETON)));

        install(installModuleIf(
                TopologyAwareNodeSelectorConfig.class,
                config -> config.getType() == FILE,
                binder -> {
                    configBinder(binder).bindConfig(TopologyFileConfig.class);
                    binder.bind(NetworkTopology.class).to(FileBasedNetworkTopology.class).in(Scopes.SINGLETON);
                    newExporter(binder).export(FileBasedNetworkTopology.class).withGeneratedName();
                }));
    }