def METHOD_NAME(x, scale=None, bias=None, eps=1e-5):
    mean = x.mean(axis=-1, keepdims=True)
    std = x.std(axis=-1, ddof=0, keepdims=True)
    result = (x - mean) / (std + eps)
    if scale is not None:
        result *= scale
    if bias is not None:
        result += bias
    return result