<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def PauliZ(local_space, states=None):
 r"""Pauli-type Z-operator .. math:: \hat{\sigma}_x = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} on an arbitrary two-level system. See :func:`PauliX` """

    local_space, states = _get_pauli_args(local_space, states)
    g, e = states
    return (
        LocalProjector(g, hs=local_space) - LocalProjector(e, hs=local_space))