def _get_hline(self) -> str:
        """Get string representation of a header line.

        Inject the custom header line, if processing the first header line.

        .. note::
            Original implementation for injecting a custom header line, and is used up to :mod:`prettytable` 2.2.0. From
            :mod:`prettytable` 2.2.0 onwards :func:`_stringify_hrule` is used instead.

        :returns: string representing a header line.
        """
        ret = self.__hline

        # Inject nice table header
        if self._is_first_hline() and self.__table_header:
            ret = self.__build_header(ret)

        self.__hline_num += 1
        return ret
Get string representation of a header line.

        Inject the custom header line, if processing the first header line.

        .. note::
            Original implementation for injecting a custom header line, and is used up to :mod:`prettytable` 2.2.0. From
            :mod:`prettytable` 2.2.0 onwards :func:`_stringify_hrule` is used instead.

        :returns: string representing a header line.
        
patroni/ctl.py