Project: s41467-025-61475-w | Function: SequentialGlauberStep (python)

system: You are an expert Python programmer implementing algorithms from scientific papers.
Complete the masked function based on the algorithm description.
Follow Python best practices and maintain consistent code style.
Return **only** the complete Python function code.

user: Complete this Python function:

**DESCRIPTION:** Implements the curved Glauber dynamics with deformed activation function for curved neural networks. Uses state-dependent temperature and modified transition probabilities to create explosive phase transitions.

**KEY TERMS:** {
  "beta1": "state-dependent effective temperature β'",
  "tanh_g": "deformed activation function tanh_γ",
  "exp_g": "exponential deformation function",
  "gamma": "curvature parameter γ"
}

**CONTEXT CODE:** """
GPLv3 2025 Miguel Aguilera
Clean version for unit testing - only function definitions with masks
"""

import numpy as np
from numba import njit

# Configure matplotlib (LaTeX disabled for testing)
import matplotlib
matplotlib.use('Agg')  # Use non-interactive backend

# ======================
#  Glauber Algorithm Functions
# ======================

@njit
def exp_g(x, gamma1):
    """Computes an exponential function with synaptic scaling correction."""
    return np.exp((1 / gamma1) * np.log(1 + gamma1 / 1 * x))


@njit
def update_beta1(xi, s, gamma, beta):
    """Dynamically updates the inverse temperature (beta) based on overlap."""
    raise NotImplementedError("Function implementation has been masked")


@njit
def SequentialGlauberStep(s, H, J, beta, gamma, xi, T):
    """
    Performs T steps of the Glauber algorithm, updating spins sequentially.
    
    Parameters:
    - s: Spin configuration
    - H: External field (zero in this case)
    - J: Interaction matrix (Hebbian)
    - beta: Inverse temperature
    - gamma: Synaptic scaling
    - xi: Stored patterns
    - T: Number of Glauber updates
    """
    raise NotImplementedError("Function implementation has been masked")

Complete the function implementation replacing "raise NotImplementedError".