docstr: Switch to static dispatching: backend functions no longer will be dynamically dispatched.
  
  This means that if you import a function after calling this function
  and change the backend, those imported functions will still point to the old backend
docstr_tok: ["Switch","to","static","dispatching",":","backend","functions","no","longer","will","be","dynamically","dispatched",".","This","means","that","if","you","import","a","function","after","calling","this","function","and","change","the","backend",",","those","imported","functions","will","still","point","to","the","old","backend"]
code: def use_static_dispatch(cls):
      """Switch to static dispatching: backend functions no longer will be dynamically dispatched.
  
      This means that if you import a function after calling this function
      and change the backend, those imported functions will still point to the old backend
      """
      # Define class methods and attributes that dynamically dispatch to the backend
      for name in cls._functions:
          setattr(
              cls,
              name,
              staticmethod(getattr(cls.current_backend(), name)),
          )
      for name in cls._attributes:
          setattr(cls, name, getattr(cls.current_backend(), name))
  
imports: import warnings
  from .core import Backend, backend_array
  import importlib
  import os
  import threading
  from contextlib import contextmanager
  import inspect
  import types
  import sys
label_desc: Use image node_id 2 for calling the BackendManager obj's underlying member method code with example usage: obj.use_static_dispatch(cls) without return types