code: def get_data(device):
      x = torch.tensor(
          [1, 2, 4, 5, 4, 3, 2, 9], dtype=torch.long, device=device
      )
      offsets = torch.tensor([0, 4], dtype=torch.long, device=device)
      y = torch.tensor([[1.0], [0.0]], device=device)
      return x, offsets, y
  
file_path: DeepSpeed/tests/unit/runtime/sparse_tensor/test_averaging_sparse_gradients.py
imports: import torch
  import deepspeed
  from unit.common import DistributedTest
  from unit.util import skip_on_arch
label_desc: Use image node_id 2 for calling a global function with example usage: get_data(device) and returns: x,  offsets,  y