code: def run_profiling(selected_profiling_task, selected_view):
      client = ipp.Client(profile="asv")
      # add it to path on the engines
      # client[:].apply_sync(add_to_path, master_project_parent)
      print("profiling task: ", selected_profiling_task)
      print("profiling view: ", selected_view)
      if selected_view == "direct":
          view = client[:]
      elif selected_view == "spanning_tree":
          view = client.spanning_tree_view()
      else:
          view = client.load_balanced_view()
  
      # view = client[:] if selected_view == 'direct' else client.load_balanced_view()
  
      if selected_profiling_task == "many_empty_tasks":
          for x in range(1, 5):
              profile_many_empty_tasks(view, 10**x)
      elif selected_profiling_task == "many_empty_tasks_non_blocking":
          for x in range(1, 5):
              profile_many_empty_tasks(view, 10**x, block=False)
      elif selected_profiling_task == "tasks_with_large_data":
          for x in range(1, 8):
              profile_tasks_with_large_data(view, 10**x)
  
imports: import sys
  import numpy
  import ipyparallel
label_desc: Use image node_id 4 for calling a global function with example usage: run_profiling(selected_profiling_task, selected_view) without return types