code: def linear_models(request):
      """
      Constructs a pair of linear models and loss functions for tensorflow and torch.
      """
      set_seed()
      input_shape = request.param.get("input_shape", (10,))
      output_shape = request.param.get("output_shape", 10)
      tf_model = tf_linear_model(input_shape, output_shape)
      tf_loss = tf.keras.losses.SparseCategoricalCrossentropy(
          from_logits=True
      )
      torch_model = torch_linear_model(input_shape, output_shape)
      torch_loss = nn.CrossEntropyLoss()
      return tf_model, tf_loss, torch_model, torch_loss
  
imports: import pytest
  import random
  import os
  import numpy
  from tensorflow import keras
  import tensorflow
  import torch
  import torch.nn
  from sklearn.datasets import make_classification, make_regression
  from sklearn.model_selection import train_test_split
  from alibi.explainers.similarity.backends.pytorch.base import _PytorchBackend
  from alibi.explainers.similarity.backends.tensorflow.base import _TensorFlowBackend
label_desc: Use image node_id 8 for calling a global function with example usage: linear_models(request) and returns: tf_model,  tf_loss,  torch_model,  torch_loss