code: def custom_stddev(batch_norm, axes):
      bias = 1.3  # make the result purposefully slightly off
      mean_func = custom_mean(batch_norm, axes)
      if type(axes) is list:
          axes = tuple(axes)
      if batch_norm:
  
          def whole_batch_stddev(batch):
              mean = mean_func(batch)[0][0]
              out = bias * batch_stddev(batch, axes, mean)
              return [out for _ in range(len(batch))]
  
          return whole_batch_stddev
      else:
  
          def per_sample_stddev(batch):
              mean = mean_func(batch)
              out = []
              for i in range(len(batch)):
                  stddev = bias * np.sqrt(
                      ((batch[i] - mean[i]) ** 2).mean(
                          axis=axes, keepdims=True
                      )
                  )
                  out.append(stddev)
              return out
  
          return per_sample_stddev
  
imports: from nvidia.dali.pipeline import Pipeline
  from nvidia.dali import backend
  import nvidia.dali.ops
  import numpy
  from test_utils import dali_type
  from nvidia.dali import fn, pipeline_def, types
  from nose2.tools import params
label_desc: Use image node_id 8 for calling a global function with example usage: custom_stddev(batch_norm, axes) and returns: whole_batch_stddev, per_sample_stddev, unknown, out