def METHOD_NAME(self, sites: Union[int, list]) -> Optional["Spin"]:
    if isinstance(sites, int):
        sites = [sites]
    for site in sites:
        if site < 0 or site >= self.size:
            raise ValueError(
                f"Site {site} not in this hilbert space of site {self.size}"
            )
    if self._total_sz is not None:
        raise TypeError(
            "Cannot take the partial trace with a total magnetization constraint."
        )
    Nsites = len(sites)
    if self.size - Nsites == 0:
        return None
    else:
        return Spin(s=self._s, N=self.size - Nsites)