def METHOD_NAME(num_spatial_orbitals: int) -> FermionicOp:
    r"""Constructs the $S^y$ operator.
    The $S^y$ operator is defined as:
    .. math::
       S^y = -\frac{i}{2} \left(S^+ - S^-\right)
    Args:
        num_spatial_orbitals: the size of the operator which to generate.
    Returns:
        The $S^y$ operator of the requested size.
    """
    op = FermionicOp(
        {
            f"+_{orb} -_{(orb + num_spatial_orbitals) % (2*num_spatial_orbitals)}": 0.5j
            * (-1.0) ** (orb < num_spatial_orbitals)
            for orb in range(2 * num_spatial_orbitals)
        }
    )
    return op