def METHOD_NAME(self) -> None:
    """
    Clean up resources.
    """
    if self._r:
        os.METHOD_NAME(self._r)
        os.METHOD_NAME(self._w)
    self._r = self._w = -1
    self.selector.METHOD_NAME()