code: def _transpile_if_required_backend(
      backend: str, fn_name: str, args=None, kwargs=None
  ):
      iterations = 1
      with BackendHandler.update_backend(backend) as ivy_backend:
          args, kwargs = ivy_backend.args_to_ivy(*args, **kwargs)
          backend_fn = ivy.__dict__[fn_name]
      backend_traced_fn = traced_if_required(
          backend, backend_fn, test_trace=True, args=args, kwargs=kwargs
      )
  
      func_timings = []
      for i in range(0, iterations):
          # timing the traced_fn
          start = time.time()
          backend_traced_fn(*args, **kwargs)
          end = time.time()
          func_timings.append(end - start)
  
      func_time = np.mean(func_timings).item()
      backend_nodes = len(backend_traced_fn._functions)
  
      data = {
          "fn_name": fn_name,
          "args": str(args),
          "kwargs": str(kwargs),
          "time": func_time,
          "nodes": backend_nodes,
      }
      _create_transpile_report(data, backend, "report.json", True)
  
imports: import copy
  import time
  from typing import Union, List, Optional
  import numpy
  import types
  import importlib
  import inspect
  from collections import OrderedDict
  from .globals import mod_backend
  from .pipeline_helper import BackendHandler, BackendHandlerMode, get_frontend_config
  import ivy
  from ivy_tests.test_ivy.helpers.test_parameter_flags import FunctionTestFlags
  import ivy_tests.test_ivy.helpers.test_parameter_flags
  import ivy_tests.test_ivy.helpers.globals
  from ivy.functional.ivy.data_type import _get_function_list, _get_functions_from_string
  from ivy_tests.test_ivy.test_frontends import NativeClass
  from ivy_tests.test_ivy.helpers.structs import FrontendMethodData
  from ivy_tests.test_ivy.helpers.testing_helpers import _create_transpile_report
  from .assertions import value_test, assert_same_type, check_unsupported_dtype
label_desc: Use image node_id 8 for calling a global function with example usage: _transpile_if_required_backend(backend, fn_name, args, kwargs) without return types