Depth setter.

def _set_depth(self, depth):
        """Depth setter."""
        if depth and (
            (not isinstance(depth, int)) or (isinstance(depth, int) and (depth < 0))
        ):
            raise RuntimeError("Argument `depth` is not valid")
        self._depth = depth