code: def test_hidden_output(hidden_output_params):
      model, layer, input_shape, flatten = hidden_output_params
      print(model, layer, input_shape, flatten)
      model = Model1() if model == 1 else model2()
      X_hidden = HiddenOutput(
          model=model,
          layer=layer,
          input_shape=input_shape,
          flatten=flatten,
      )(X_h)
      if layer == -2:
          assert_shape = (n, dim1, n_hidden)
      elif layer == -1:
          assert_shape = (n, dim1, n_classes)
      if flatten:
          assert_shape = (assert_shape[0],) + (
              np.prod(assert_shape[1:]),
          )
      assert X_hidden.shape == assert_shape
  
file_path: alibi-detect/alibi_detect/cd/tensorflow/tests/test_preprocess_tf.py
imports: import numpy
  import pytest
  import tensorflow
  from tensorflow.keras.layers import Dense, Input, InputLayer
  from alibi_detect.cd.tensorflow import UAE, HiddenOutput
label_desc: Use image node_id 5 for calling a global function with example usage: test_hidden_output(hidden_output_params) without return types