def gauss_print(d, value):
    """
    Decides how to print a parameter.
    For example, opt, opt=ts or opt=(ts,eigentest,calcfc). 
    Checks a |Settings| object, `d`, for a key, `value`.
    For example, sett.input.freq=True in the script would
    produce 'freq', sett.input.scf='tight' would produce
    'scf=tight', and sett.input.opt='ts,noeigentest,calcfc' 
    produces 'opt=(ts,noeigentest,calcfc)'. Note: doesn't
    work with lists or dict values, but unlikely that they would
    be passed in as settings values anyway.
    """
    if isinstance(d[f'{value}'], bool) or isinstance(d[f'{value}'], int):
        return value
    elif len(d[f'{value}'].split(',')) > 1 or '=' in d[f'{value}']:
        return f"{value}=({d[f'{value}']})"
    else:
        return f"{value}={d[f'{value}']}"
