Convert decimal number to DMS format.

        :param num: Decimal number.
        :param _type: Type of number.
        :return: Number in DMS format.

def _dd_to_dms(num: float, _type: str) -> str:
        """Convert decimal number to DMS format.

        :param num: Decimal number.
        :param _type: Type of number.
        :return: Number in DMS format.
        """
        degrees = int(num)
        minutes = int((num - degrees) * 60)
        seconds = (num - degrees - minutes / 60) * 3600.00
        seconds = round(seconds, 3)
        result = [abs(i) for i in (degrees, minutes, seconds)]

        direction = ''
        if _type == 'lg':
            direction = 'W' if degrees < 0 else 'E'
        elif _type == 'lt':
            direction = 'S' if degrees < 0 else 'N'

        return ('{}º{}\'{:.3f}"' + direction).format(*result)