code: def pytest_configure(config):
      global available_frameworks
      global multiprocessing_flag
      if config.getoption("--set-backend"):
          BackendHandler._update_context(BackendHandlerMode.SetBackend)
  
      # Ivy Exception traceback
      set_exception_trace_mode(config.getoption("--ivy-tb"))
  
      # Pytest traceback
      config.option.tbstyle = config.getoption("--tb")
  
      # device
      raw_value = config.getoption("--device")
      if raw_value == "all":
          devices = ["cpu", "gpu:0", "tpu:0"]
      else:
          devices = raw_value.split(",")
  
      # framework
      raw_value = config.getoption("--backend")
      if raw_value == "all":
          backend_strs = available_frameworks
      else:
          backend_strs = raw_value.split(",")
      no_mp = config.getoption("--no-mp")
  
      if not no_mp:
          # we go multiprocessing, if  multiversion
          known_backends = {"tensorflow", "torch", "jax"}
          found_backends = set()
          for fw in backend_strs:
              if "/" in fw:
                  # set backend to be used
                  BackendHandler._update_context(
                      BackendHandlerMode.SetBackend
                  )
                  multiprocessing_flag = True
                  # spin up multiprocessing
                  # build mp process, queue, initiation etc
                  input_queue = mp.Queue()
                  output_queue = mp.Queue()
                  proc = mp.Process(
                      target=backend_proc,
                      args=(input_queue, output_queue),
                  )
                  # start the process so that it loads the framework
                  input_queue.put(fw)
                  proc.start()
  
                  # we have the process running, the framework imported within,
                  # we now pack the queue and the process and store it in dict
                  # for future access
                  fwrk, ver = fw.split("/")
                  mod_backend[fwrk] = (proc, input_queue, output_queue)
                  # set the latest version for the rest of the test code and move on
                  default_framework_mapper(fwrk, set_too=False)
                  found_backends.add(fwrk)
  
          if found_backends:
              # we know it's multiversion+multiprocessing
              # spin up processes for other backends that
              # were not found in --backend flag
              left_frameworks = known_backends.difference(
                  found_backends
              )
              for fw in left_frameworks:
                  # spin up multiprocessing
                  # build mp process, queue, initiation etc
                  # find the latest version of this framework
                  # and set it in the path for rest of the code
                  # to access
                  version = default_framework_mapper(fw, set_too=False)
                  # spin up process only if a version was found else don't
                  if version:
                      input_queue = mp.Queue()
                      proc = mp.Process(
                          target=backend_proc,
                          args=(input_queue, output_queue),
                      )
                      # start the process so that it loads the framework
                      input_queue.put(f"{fw}/{version}")
                      proc.start()
  
                  # we have the process running, the framework imported within,
                  # we now pack the queue and the process and store it in dict
                  # for future access
                  mod_backend[fw] = (proc, input_queue, output_queue)
  
      else:
          # no multiprocessing if multiversion
          for fw in backend_strs:
              if "/" in fw:
                  multiprocessing_flag = True
                  # multiversion, but without multiprocessing
                  sys.path.insert(1, f"/opt/fw/{fw}")
  
      # frontend
      frontend = config.getoption("--frontend")
      if frontend:
          frontend_strs = frontend.split(",")
          # if we are passing a frontend flag, it has to have a version with it
          for frontend in frontend_strs:
              # spin up multiprocessing
              fw, ver = frontend.split("/")
              # build mp process, queue, initiation etc
              queue = mp.Queue()
              proc = mp.Process(target=frontend_proc, args=(queue,))
              # start the process so that it loads the framework
              proc.start()
              queue.put(f"{fw}/{ver}")
              # we have the process running, the framework imported within,
              # we now pack the queue and the process and store it in dict
              # for future access
              mod_frontend[fw] = (proc, queue)
  
      # trace_graph
      raw_value = config.getoption("--trace_graph")
      if raw_value == "both":
          trace_modes = [True, False]
      elif raw_value == "true":
          trace_modes = [True]
      else:
          trace_modes = [False]
  
      # implicit
      raw_value = config.getoption("--with_implicit")
      if raw_value == "true":
          implicit_modes = [True, False]
      else:
          implicit_modes = [False]
  
      # create test configs
      for backend_str in backend_strs:
          for device in devices:
              if "/" in backend_str:
                  backend_str = backend_str.split("/")[0]
              if (
                  backend_str in UNSUPPORTED_FRAEMWORK_DEVICES
                  and device.partition(":")[0]
                  in UNSUPPORTED_FRAEMWORK_DEVICES[backend_str]
              ):
                  continue
              for trace_graph in trace_modes:
                  for implicit in implicit_modes:
                      TEST_PARAMS_CONFIG.append(
                          (
                              device,
                              backend_str,
                              trace_graph,
                              implicit,
                          )
                      )
  
      process_cl_flags(config)
  
imports: import os
  import pytest
  from typing import Dict
  import sys
  import multiprocessing
  from packaging import version
  from .helpers.globals import mod_backend, mod_frontend
  import ivy_tests.test_ivy.helpers.test_parameter_flags
  from ivy import set_exception_trace_mode
  from ivy_tests.test_ivy.helpers import globals
  from ivy_tests.test_ivy.helpers.available_frameworks import available_frameworks
  from ivy_tests.test_ivy.helpers.multiprocessing import backend_proc, frontend_proc
  from ivy_tests.test_ivy.helpers.pipeline_helper import BackendHandler, BackendHandlerMode
label_desc: Use image node_id 3 for calling a global function with example usage: pytest_configure(config) without return types