code: def default_framework_mapper(fw, fw_path="/opt/fw/", set_too=False):
      # do a path search, get the latest
      # so that we can get the highest version
      # available dynamically and set that for
      # use by the rest of the code
      # eg: torch/1.11.0 and torch/1.12.0
      # this will map to torch/1.12.0
      try:
          versions = os.listdir(f"/opt/fw/{fw}")
      except FileNotFoundError:
          # if no version exists return None
          return None
      versions = [version.parse(v) for v in versions]
      versions.sort()
      if set_too:
          sys.path.insert(1, f"{fw_path}{fw}/{str(versions[-1])}")
      return str(versions[-1])
  
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 1 for calling a global function with example usage: default_framework_mapper(fw, fw_path, set_too) and returns: str, None