def get_int(self, name: str, default: int = 0, base_unit: Optional[str] = None) -> int:
        """Gets current value of *name* from the global configuration and try to return it as :class:`int`.

        :param name: name of the parameter.
        :param default: default value if *name* is not in the configuration or invalid.
        :param base_unit: an optional base unit to convert value of *name* parameter to.
                          Not used if the value does not contain a unit.

        :returns: currently configured value of *name* from the global configuration or *default* if it is not set or
            invalid.
        """
        ret = parse_int(self.get(name), base_unit)
        return default if ret is None else ret
Gets current value of *name* from the global configuration and try to return it as :class:`int`.

        :param name: name of the parameter.
        :param default: default value if *name* is not in the configuration or invalid.
        :param base_unit: an optional base unit to convert value of *name* parameter to.
                          Not used if the value does not contain a unit.

        :returns: currently configured value of *name* from the global configuration or *default* if it is not set or
            invalid.
        
patroni/global_config.py