code: def function_on_device(function, param_devices, result_device):
      """Annotates a Relay function with the device types on which its parameters and result should
      be stored.
  
      Parameters
      ----------
      function : tvm.relay.Function
          The function to be annotated.
  
      param_devices : Array[Union[:py:class:`Device`, str]]
          The devices for each parameter.
  
      result_device: Union[:py:class:`Device`, str]
          The device for the function result.
  
      Returns
      -------
      result : tvm.relay.Function
          The annotated function.
      """
      return _make.FunctionOnDevice(
          function,
          [_make_virtual_device(d) for d in param_devices],
          _make_virtual_device(result_device),
      )
  
file_path: tvm/python/tvm/relay/op/annotation/annotation.py
imports: from tvm import target
  from tvm.runtime import ndarray
  from tvm.runtime import Device
  from .None import _make
  from ..None import op
label_desc: Use image node_id 3 for calling a global function with example usage: function_on_device(function, param_devices, result_device) and returns: _make