code: def local_machine_launch(args, env: Dict[str, str]):
      ipcontroller_command = "ipcontroller --profile {profile}".format(
          profile=args.profile
      )
      ipengine_command = (
          "bfrun -np {np} ipengine start --profile {profile}".format(
              np=args.np,
              profile=args.profile,
          )
      )
      # Maybe kill the last time unfinished process.
      if _maybe_kill_ipcontroller_process(args.profile):
          print("Found and killed the unfinished ipcontroller process.")
      subprocess.run(
          "ipcluster nbextension enable --user", shell=True, env=env
      )
      print("Starting the controller.")
      stdout = None if args.verbose else subprocess.PIPE
      p_controller = subprocess.Popen(
          ipcontroller_command,
          shell=True,
          env=env,
          stdout=stdout,
          stderr=subprocess.STDOUT,
      )
      _wait_engine_file_ready(args.profile)
      print("Starting the engines.")
      if not args.enable_heartbeat:
          disabled = _disable_heart_beatcheck(args.profile)
          print(f"Heartbeat Service Disabled: {disabled}")
  
      p_engine = subprocess.Popen(ipengine_command, shell=True, env=env)
      engine_pid_done = False
      while not engine_pid_done:
          try:
              time.sleep(2)
              _write_ipengine_pid(args.profile)
              engine_pid_done = True
          except ipp.NoEnginesRegistered as e:
              pass
      while not p_controller.poll() and not p_engine.poll():
          time.sleep(600)
  
imports: import argparse
  import json
  import os
  import multiprocessing
  import signal
  import subprocess
  import time
  from typing import Dict, List
  import ipyparallel
  import bluefog
  from bluefog.run import env_util, network_util, horovod_driver
label_desc: Use image node_id 15 for calling a global function with example usage: local_machine_launch(args, env) without return types