code: def instances():
      lengths = numpy.asarray([5, 4], dtype="int32")
      keys = numpy.arange(9, dtype="uint64")
      values = numpy.ones(9, dtype="float32")
      X = (keys, values, lengths)
      y = numpy.asarray([0, 2], dtype="int32")
      return X, to_categorical(y, n_classes=3)
  
file_path: thinc/thinc/tests/layers/test_sparse_linear.py
imports: import math
  import numpy
  import pytest
  from thinc.api import SGD, SparseLinear, SparseLinear_v2, to_categorical
label_desc: Use image node_id 1 for calling a global function with example usage: instances() and returns: X,  to_categorical