code: def prevent_access_locally(fn):
      @functools.wraps(fn)
      def _prevent_access_locally(*args, **kwargs):
          if ivy.is_local():
              raise RuntimeError(
                  f"Calling {fn.__name__} is not allowed on this object."
              )
          return fn(*args, **kwargs)
  
      return _prevent_access_locally
  
imports: import os
  import copy
  import types
  import ivy
  import importlib
  import functools
  import numpy
  import gc
  from ivy.utils import _importlib, verbosity
  from ivy.func_wrapper import _wrap_function
  from ivy.utils.backend.sub_backend_handler import _clear_current_sub_backends, fn_name_from_version_specific_fn_name
  from ivy.utils.exceptions import _handle_inplace_mode
label_desc: Use image node_id 1 for calling a global function with example usage: prevent_access_locally(fn) and returns: _prevent_access_locally, fn