code: def _data_to_new_backend(x, previous_backend):
      device = previous_backend.dev(x.data)
      try:
          result = ivy.from_dlpack(previous_backend.to_dlpack(x.data))
          result = ivy.to_device(result, device)
      except Exception:
          np_res = previous_backend.to_numpy(x.data)
          result = ivy.asarray(np_res, device=device)
      return result
  
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 8 for calling a global function with example usage: _data_to_new_backend(x, previous_backend) and returns: result