Implement a function that performs Batch Normalization on a 4D NumPy array representing a batch of feature maps in the BCHW format (batch, channels, height, width).
Training mode (training=True):
ddof=0)running_stat = (1 - momentum) * running_stat + momentum * batch_stat (PyTorch's momentum formula; unlike PyTorch, batch_stat for the variance is the same population variance)Inference mode (training=False):
After normalization, apply scale (gamma) and shift (beta) parameters. Use the provided epsilon value to ensure numerical stability.
Return a tuple of (output, running_mean, running_var), the running statistics with shape (1, C, 1, 1). If running_mean or running_var is None, start from zeros and ones respectively.