and return value of the call to the method ProjectState.from_apps with apps as an argument, assign it to the autodetector. call the method autodetector.changes with the graph set to executor.loader.graph as an argument, substitute it for the changes.
changes = autodetector . changes ( graph = executor . loader . graph )