code: def test_wrong_input():
      import os
  
      os.environ["THEANO_FLAGS"] = "device=cpu, floatX=float64"
  
      from sklearn.utils.validation import NotFittedError
      import numpy as np
      import brainiak.funcalign.sssrm
  
      voxels = 100
      align_samples = 400
      samples = 500
      subjects = 2
      features = 3
      n_labels = 4
  
      model = brainiak.funcalign.sssrm.SSSRM(
          n_iter=5, features=features, gamma=10.0, alpha=0.1
      )
      assert model, "Invalid SSSRM instance!"
  
      # Create a Shared response S with K = 3
      theta = np.linspace(-4 * np.pi, 4 * np.pi, samples)
      z = np.linspace(-2, 2, samples)
      r = z**2 + 1
      x = r * np.sin(theta)
      y = r * np.cos(theta)
  
      S = np.vstack((x, y, z))
      S_align = S[:, :align_samples]
      S_classify = S[:, align_samples:]
      X = []
      Z = []
      Z2 = []
      W = []
      y = []
      Q, R = np.linalg.qr(np.random.random((voxels, features)))
      W.append(Q)
      X.append(
          Q.dot(S_align)
          + 0.1 * np.random.random((voxels, align_samples))
      )
      Z.append(
          Q.dot(S_classify)
          + 0.1 * np.random.random((voxels, samples - align_samples))
      )
      Z2.append(
          Q.dot(S_classify)
          + 0.1 * np.random.random((voxels, samples - align_samples))
      )
      y.append(
          np.repeat(
              np.arange(n_labels), (samples - align_samples) / n_labels
          )
      )
  
      # Check that transform does NOT run before fitting the model
      with pytest.raises(NotFittedError):
          model.transform(X)
      print("Test: transforming before fitting the model")
  
      # Check that predict does NOT run before fitting the model
      with pytest.raises(NotFittedError):
          model.predict(X)
      print("Test: predicting before fitting the model")
  
      # Check that it does NOT run with 1 subject on X
      with pytest.raises(ValueError):
          model.fit(X, y, Z)
      print("Test: running SSSRM with 1 subject (alignment)")
  
      # Create more subjects align and classification data
      for subject in range(1, subjects):
          Q, R = np.linalg.qr(np.random.random((voxels, features)))
          W.append(Q)
          X.append(
              Q.dot(S_align)
              + 0.1 * np.random.random((voxels, align_samples))
          )
          Z2.append(
              Q.dot(S_classify)
              + 0.1
              * np.random.random((voxels, samples - align_samples))
          )
  
      # Check that it does NOT run with 1 subject on y
      with pytest.raises(ValueError):
          model.fit(X, y, Z)
      print("Test: running SSSRM with 1 subject (labels)")
  
      # Create more subjects labels data
      for subject in range(1, subjects):
          y.append(
              np.repeat(
                  np.arange(n_labels),
                  (samples - align_samples) / n_labels,
              )
          )
  
      # Check that it does NOT run with 1 subject on Z
      with pytest.raises(ValueError):
          model.fit(X, y, Z)
      print("Test: running SSSRM with 1 subject (classif.)")
  
      # Check that alpha is in (0,1) range
      model_bad = brainiak.funcalign.sssrm.SSSRM(
          n_iter=1, features=features, gamma=10.0, alpha=1.5
      )
      assert model_bad, "Invalid SSSRM instance!"
      with pytest.raises(ValueError):
          model_bad.fit(X, y, Z)
      print("Test: running SSSRM with wrong alpha")
  
      # Check that gamma is positive
      model_bad = brainiak.funcalign.sssrm.SSSRM(
          n_iter=1, features=features, gamma=-0.1, alpha=0.2
      )
      assert model_bad, "Invalid SSSRM instance!"
      with pytest.raises(ValueError):
          model_bad.fit(X, y, Z)
      print("Test: running SSSRM with wrong gamma")
  
imports: import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_wrong_input() without return types