def METHOD_NAME(x, vals):
    r"""Returns the mean number of photons in the Gaussian state that
    encodes the adjacency matrix x*A where vals are the eigenvalues of positive semidefinite A
    Args:
        x (float): Scaling parameter
        vals (array): Eigenvalues of the matrix A
    Returns:
        n_mean: Mean photon number in the Gaussian state
    """
    vals2 = scale * x * vals
    n = np.sum(vals2 / (1.0 - vals2))
    return n