def get_dsa_constants(constants=None):
    """Returns (p, q, g) if constants is None, and constants otherwise.

    This allows you to write:
    ```
    def function(constants=None):
        p, q, g = get_dsa_constants(constants)
    ```
    instead of:
    ```
    def function(constants=None):
        if constants is None:
            p, q, g = get_dsa_constants()
        else:
            p, q, g = constants
    ```
    """
    p = 0x800000000000000089E1855218A0E7DAC38136FFAFA72EDA7859F2171E25E65EAC698C1702578B07DC2A1076DA241C76C62D374D8389EA5AEFFD3226A0530CC565F3BF6B50929139EBEAC04F48C3C84AFB796D61E5A4F9A8FDA812AB59494232C7D2B4DEB50AA18EE9E132BFA85AC4374D7F9091ABC3D015EFC871A584471BB1
    q = 0xF4F47F05794B256174BBA6E9B396A7707E563C5B
    g = 0x5958C9D3898B224B12672C0B98E06C60DF923CB8BC999D119458FEF538B8FA4046C8DB53039DB620C094C9FA077EF389B5322A559946A71903F990F1F7E0E025E2D7F7CF494AFF1A0470F5B64C36B625A097F1651FE775323556FE00B3608C887892878480E99041BE601A62166CA6894BDD41A7054EC89F756BA9FC95302291
    if constants is None:
        return p, q, g
    else:
        return constants