code: def test_linear_dimensions_on_data():
      X = MagicMock(shape=(5, 10), spec=numpy.ndarray)
      X.ndim = 2
      X.dtype = "float32"
      y = MagicMock(shape=(8,), spec=numpy.ndarray)
      y.ndim = 2
      y.dtype = "float32"
      y.max = MagicMock()
      model = Linear()
      model.initialize(X, y)
      assert model.get_dim("nI") is not None
      y.max.assert_called_with()
  
imports: import numpy
  import pytest
  from hypothesis import given, settings
  from mock import MagicMock
  from numpy.testing import assert_allclose
  from thinc.api import SGD, Dropout, Linear, chain
  from ..strategies import arrays_OI_O_BI
  from ..util import get_model, get_shape
label_desc: Use image node_id 3 for calling a global function with example usage: test_linear_dimensions_on_data() without return types