import services def my_app(): mobile_app = services.spawn(MobileTemplate) mobile_app.setLevel(logging.ERROR) mobile_app.run() if __name__ == "__main__": my_app()
from services import spawn, MobileTemplate def my_app(): mobile_app = spawn(MobileTemplate) mobile_app.setLevel(logging.INFO) mobile_app.run() if __name__ == "__main__": my_app()These examples show how to use the `services.spawn` function to create a new instance of the `MobileTemplate` service, and then use the `setLevel` method to adjust the logging level. The `run` method is called at the end of each code block to execute the mobile app. The package library for this code example would depend on which version of the `services` module contains the `spawn` method. If this is a custom module created by the developer, it may not require any additional package libraries. If provided by an external source, the `MobileTemplate` package and any dependencies would need to be installed before it can be used in code.