def process_new_values(self, invalues: T.List[T.Union[(TYPE_var, ExecutableSerialisation)]]) -> None:
    invalues = listify(invalues)
    for v in invalues:
        if isinstance(v, ObjectHolder):
            raise InterpreterException('Modules must not return ObjectHolders')
        if isinstance(v, (build.BuildTarget, build.CustomTarget, build.RunTarget)):
            self.add_target(v.name, v)
        elif isinstance(v, list):
            self.process_new_values(v)
        elif isinstance(v, ExecutableSerialisation):
            v.subproject = self.subproject
            self.build.install_scripts.append(v)
        elif isinstance(v, build.Data):
            self.build.data.append(v)
        elif isinstance(v, build.SymlinkData):
            self.build.symlinks.append(v)
        elif isinstance(v, dependencies.InternalDependency):
            self.process_new_values(v.sources[0])
        elif isinstance(v, build.InstallDir):
            self.build.install_dirs.append(v)
        elif isinstance(v, Test):
            self.build.tests.append(v)
        elif isinstance(v, (int, str, bool, Disabler, ObjectHolder, build.GeneratedList, ExternalProgram, build.ConfigurationData)):
            pass
        else:
            raise InterpreterException(f'Module returned a value of unknown type {v!r}.')
def process_new_values(self, invalues: T.List[T.Union[(TYPE_var, ExecutableSerialisation)]]) -> None:
    invalues = listify(invalues)
    for v in invalues:
        if isinstance(v, ObjectHolder):
            raise InterpreterException('Modules must not return ObjectHolders')
        if isinstance(v, (build.BuildTarget, build.CustomTarget, build.RunTarget)):
            self.add_target(v.name, v)
        elif isinstance(v, list):
            self.process_new_values(v)
        elif isinstance(v, ExecutableSerialisation):
            v.subproject = self.subproject
            self.build.install_scripts.append(v)
        elif isinstance(v, build.Data):
            self.build.data.append(v)
        elif isinstance(v, build.SymlinkData):
            self.build.symlinks.append(v)
        elif isinstance(v, dependencies.InternalDependency):
            self.process_new_values(v.sources[0])
        elif isinstance(v, build.InstallDir):
            self.build.install_dirs.append(v)
        elif isinstance(v, Test):
            self.build.tests.append(v)
        elif isinstance(v, (int, str, bool, Disabler, ObjectHolder, build.GeneratedList, ExternalProgram, build.ConfigurationData)):
            pass
        else:
            raise InterpreterException(f'Module returned a value of unknown type {v!r}.')