code: def _set_sub_backend_as_ivy(
      original: dict, target: ModuleType, sub_backend: ModuleType
  ):
      backend_str = ivy.current_backend_str()
      for k, v in original.items():
          if k not in sub_backend.__dict__ and not k.startswith("__"):
              target.__dict__[k] = v
          if (
              k in sub_backend.__dict__
              and not k.startswith("__")
              and isinstance(v, FunctionType)
          ):
              target.__dict__[k] = _wrap_function(
                  key=k,
                  to_wrap=sub_backend.__dict__[k],
                  original=v,
                  compositional=False,
              )
          elif (
              k in sub_backend.__dict__
              and not k.startswith("__")
              and isinstance(v, ModuleType)
          ):
              # we are creating a module to avoid inplace updating
              # the sub_backends dict's modules, this happens when
              # unsetting the sub_backend as we partially update the modules
              mod = ModuleType(k)
              mod.__name__ = v.__name__
              mod.__file__ = v.__file__
              target.__dict__[k] = mod
          if (
              isinstance(v, ModuleType)
              and "ivy.functional." in v.__name__
              and os.path.join("{}", "__init__.py").format(backend_str)
              not in v.__file__
              and k in sub_backend.__dict__
          ):
              _set_sub_backend_as_ivy(
                  v.__dict__,
                  target.__dict__[k],
                  sub_backend.__dict__[k],
              )
  
file_path: ivy/ivy/utils/backend/sub_backend_handler.py
imports: import os
  import re
  from types import ModuleType, FunctionType
  import logging
  import importlib
  import ivy
  from ivy.func_wrapper import _wrap_function
  from ivy.utils.exceptions import IvyException
label_desc: Use image node_id 5 for calling a global function with example usage: _set_sub_backend_as_ivy(original, target, sub_backend) without return types