code: def handle_soft_device_variable(*args, fn, **kwargs):
      with tf.device(ivy.default_device(as_native=True)):
          return fn(*args, **kwargs)
  
imports: import tensorflow
  from typing import Union, Optional
  import ivy
  from ivy.functional.ivy.device import Profiler
label_desc: Use image node_id 10 for calling a global function with example usage: handle_soft_device_variable() and returns: fn