code: def z_test(real, expected, i, num_samples):
      numerical_error = 1e-6  # per-operation error
      moment_mean = expected[i]
      moment_squared = expected[2 * i]
      moment_var = moment_squared - moment_mean * moment_mean
  
      error_per_moment = i * numerical_error
      total_variance = (
          moment_var / float(num_samples) + error_per_moment
      )
      return abs((real[i] - moment_mean) / math.sqrt(total_variance))
  
imports: import functools
  import math
  import timeit
  import numpy
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import random_seed
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import stateless_random_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 3 for calling a global function with example usage: z_test(real, expected, i, num_samples) and returns: abs