def METHOD_NAME(args: 'Namespace'):
    """
    Starts an Executor in a WorkerRuntime
    :param args: arguments coming from the CLI.
    """
    from jina.serve.executors.run import run, run_stateful
    import multiprocessing
    from jina.jaml import JAML
    envs = {}
    envs.update(args.env or {})
    if not args.stateful:
        run(name=args.name,
            args=args,
            runtime_cls=args.runtime_cls,
            envs=envs,
            is_started=multiprocessing.Event(),
            is_signal_handlers_installed=multiprocessing.Event(),
            is_shutdown=multiprocessing.Event(),
            is_ready=multiprocessing.Event(),
            jaml_classes=JAML.registered_classes())
    else:
        run_stateful(name=args.name,
                     args=args,
                     runtime_cls=args.runtime_cls,
                     envs=envs)