def METHOD_NAME(
    hilbert: _AbstractHilbert, site: int, dtype: _DType = complex
) -> _LocalOperator:
    """
    Builds the :math:`\\sigma^y` operator acting on the `site`-th of the Hilbert
    space `hilbert`.
    If `hilbert` is a non-Spin space of local dimension M, it is considered
    as a (M-1)/2 - spin space.
    :param hilbert: The hilbert space
    :param site: the site on which this operator acts
    :return: a nk.operator.LocalOperator
    """
    import numpy as np
    import netket.jax as nkjax
    if not nkjax.is_complex_dtype(dtype):
        import jax.numpy as jnp
        import warnings
        old_dtype = dtype
        dtype = jnp.promote_types(complex, old_dtype)
        warnings.warn(
            np.ComplexWarning(
                f"A complex dtype is required (dtype={old_dtype} specified). "
                f"Promoting to dtype={dtype}."
            ),
            stacklevel=2,
        )
    N = hilbert.size_at_index(site)
    S = (N - 1) / 2
    D = np.array([1j * np.sqrt((S + 1) * 2 * a - a * (a + 1)) for a in np.arange(1, N)])
    mat = np.diag(D, -1) + np.diag(-D, 1)
    mat = _sparse.coo_matrix(mat)
    return _LocalOperator(hilbert, mat, [site], dtype=dtype)