def METHOD_NAME(self):
    if self._child:
        logger.debug("close existing child: %s", self._child_name)
        try:
            self._child.close()
        except Exception:
            logger.exception("Error closing child")
        self._child = None
        self._child_name = None