code: def test_linear_invariant(self, sys, sample_time, samples_number):
      time = np.arange(samples_number) * sample_time
      _, yout_cont, _ = lsim(sys, T=time, U=time)
      _, yout_disc, _ = dlsim(
          c2d(sys, sample_time, method="foh"), u=time
      )
      assert_allclose(yout_cont.ravel(), yout_disc.ravel())
  
imports: import numpy
  from numpy.testing import assert_array_almost_equal, assert_almost_equal, assert_allclose, assert_equal
  import pytest
  from scipy.signal import cont2discrete
  from scipy.signal import dlsim, ss2tf, ss2zpk, lsim, lti
  from scipy.signal import tf2ss, impulse, dimpulse, step, dstep
label_desc: Use image node_id 3 for calling the TestC2dInvariants obj's underlying member method code with example usage: obj.test_linear_invariant(sys, sample_time, samples_number) without return types