code: def calculate_stats(loader, N):
      mean, stdev = 0.0, 0.0
      for x_batch, _ in tqdm(loader):
          mean += x_batch.sum(0) / N
          stdev += x_batch.pow(2).sum(0) / N
      return mean, ch.sqrt(stdev - mean.pow(2))
  
file_path: ffcv/examples/docs_examples/linear_regression.py
imports: from tqdm import tqdm
  import time
  import numpy
  import pickle
  import torch
  from torch.utils.data import TensorDataset, DataLoader
  from ffcv.fields import NDArrayField, FloatField
  from ffcv.fields.basics import FloatDecoder
  from ffcv.fields.decoders import NDArrayDecoder
  from ffcv.loader import Loader, OrderOption
  from ffcv.writer import DatasetWriter
  from ffcv.transforms import ToTensor, ToDevice, Squeeze
  import os
label_desc: Use image node_id 1 for calling a global function with example usage: calculate_stats(loader, N) and returns: mean,  ch