code: def get_mean_and_std(dataset):
      """Compute the mean and std value of dataset."""
      dataloader = torch.utils.data.DataLoader(
          dataset, batch_size=1, shuffle=True, num_workers=2
      )
      mean = torch.zeros(3)
      std = torch.zeros(3)
      print("==> Computing mean and std..")
      for inputs, targets in dataloader:
          for i in range(3):
              mean[i] += inputs[:, i, :, :].mean()
              std[i] += inputs[:, i, :, :].std()
      mean.div_(len(dataset))
      std.div_(len(dataset))
      return mean, std
  
file_path: nni/examples/trials/cifar10_pytorch/utils.py
imports: import os
  import sys
  import time
  import torch
  import torch.nn
  import torch.nn.init
label_desc: Use image node_id 1 for calling a global function with example usage: get_mean_and_std(dataset) and returns: mean,  std