code: def torch_linear_model(input_shape_arg, output_shape_arg):
      """
      Constructs a linear model for `torch`.
      """
      input_size = np.prod(input_shape_arg).item()
  
      class Model(nn.Module):
          def __init__(self, input_shape, output_shape):
              super(Model, self).__init__()
              self.linear_stack = nn.Sequential(
                  nn.Flatten(start_dim=1),
                  nn.Linear(input_shape, output_shape),
              )
  
          def forward(self, x):
              x = x.type(torch.FloatTensor)
              return self.linear_stack(x)
  
      return Model(input_size, output_shape_arg)
  
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 10 for calling a global function with example usage: torch_linear_model(input_shape_arg, output_shape_arg) and returns: Model, self