def parallel_total_density_range_tag_from_parallel_total_density_range(
    parallel_total_density_range):
    """Generate a parallel_total_density_range tag, to customize phase names based on the range of values in total     density that are allowed for the non-linear search in the parallel direction.

    This changes the phase name 'phase_name' as follows:

    parallel_total_density_range = None -> phase_name
    parallel_total_density_range = (0, 10) -> phase_name_parallel_total_density_range_(0,10)
    parallel_total_density_range = (20, 60) -> phase_name_parallel_total_density_range_(20,60)
    """
    if parallel_total_density_range == None:
        return ''
    else:
        x0 = str(parallel_total_density_range[0])
        x1 = str(parallel_total_density_range[1])
        return '_par_range_(' + x0 + ',' + x1 + ')'
