def desi_target_from_survey(survey):
    """ Return the survey of DESI_TARGET as a function of survey used (cmx, sv1, sv2, sv3, main)."""
    if survey == 'special':
        # to avoid error, return one of the column, SV2_DESI_TARGET should be full of 0.
        return 'SV2_DESI_TARGET'
    if survey == 'cmx':
        return 'CMX_TARGET'
    elif survey == 'sv1':
        return 'SV1_DESI_TARGET'
    elif survey == 'sv2':
        return 'SV2_DESI_TARGET'
    elif survey == 'sv3':
        return 'SV3_DESI_TARGET'
    elif survey == 'main':
        return 'DESI_TARGET'