<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def total_detection_product_filename_generator(obs_info,nn):
 """ Generate image and sourcelist filenames for total detection products Parameters obs_info : list list of items that will be used to generate the filenames: proposal_id, visit_id, instrument, and detector nn : string the single-exposure image number (NOTE: only used in single_exposure_product_filename_generator()) Returns -------- product_filename_dict : dictionary A dictionary containing the generated filenames. """

    proposal_id = obs_info[0]
    visit_id = obs_info[1]
    instrument = obs_info[2]
    detector = obs_info[3]

    product_filename_dict = {}
    product_filename_dict["image"] = "hst_{}_{}_{}_{}.fits".format(proposal_id, visit_id, instrument, detector)
    product_filename_dict["source catalog"] = product_filename_dict["image"].replace(".fits",".cat")

    return (product_filename_dict)