<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list(gandi, only_paas, only_vm):
 """ List snapshot profiles. """

    target = None
    if only_paas and not only_vm:
        target = 'paas'
    if only_vm and not only_paas:
        target = 'vm'

    output_keys = ['id', 'name', 'kept_total', 'target']
    result = gandi.snapshotprofile.list({}, target=target)

    for num, profile in enumerate(result):
        if num:
            gandi.separator_line()
        output_snapshot_profile(gandi, profile, output_keys)

    return result