def decimal_to_dms(decimal_value):
if decimal_value < <NUM_LIT:0>:<EOL><INDENT>negative = True<EOL>dec_val = fabs(decimal_value)<EOL><DEDENT>else:<EOL><INDENT>negative = False<EOL>dec_val = decimal_value<EOL><DEDENT>degrees = trunc(dec_val)<EOL>minutes_deg = dec_val - degrees<EOL>minutes_mm = minutes_deg * <NUM_LIT><EOL>minutes_out = trunc(minutes_mm)<EOL>seconds = (minutes_mm - minutes_out)*<NUM_LIT><EOL>if negative:<EOL><INDENT>degrees = degrees<EOL>return '<STR_LIT:->', degrees, minutes_out, seconds<EOL><DEDENT>else:<EOL><INDENT>return '<STR_LIT:+>', degrees, minutes_out, seconds<EOL><DEDENT>
Converts from decimal degrees (for declination coords) to DD:MM:SS.

    Parameters
    ----------

    decimal_value : float
        A decimal value to convert to degrees, minutes, seconds sexagesimal
        format.

    Returns
    -------

    tuple
        A four element tuple is returned: (sign, HH, MM, SS.ssss...)