<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _get_num_parallel_threads(max_threads, num_cores, mem_available_mb):
    '''
    Ensure at least ~1.2 GB memory per thread, see PTFM-18767
    '''
    return min(max_threads, num_cores, max(int(mem_available_mb/1200), 1))