code: def forward_model(model, inputs):
      samples = model(**inputs)
      sample_means = torch.mean(samples, axis=1)
      return samples, sample_means
  
imports: import torch
  import torch.nn
  import torch.optim
  from tqdm.auto import tqdm
  from typing import List
  from sparse_layer import SparseNet
label_desc: Use image node_id 1 for calling a global function with example usage: forward_model(model, inputs) and returns: samples,  sample_means