def get_not_repeated_file_name(path_with_file):
    directory, file_name = os.path.split(path_with_file)
    file_rename = file_name
    while os.path.exists(directory+"/"+file_rename):
        file_rename = "_"+file_rename
    return directory+"/"+file_rename
This should generate an expression that picks the lower value for comparison.
dataset/ETHPy150Open victor-gil-sepulveda/pyProCT/pyproct/tools/scriptTools.py/get_not_repeated_file_name--crossover with--dataset/ETHPy150Open thedrow/django-natural-query/tests/unit/test_date_natural_query_descriptor.py/DateNaturalQueryDescriptorTestCase.test_concated_gt_operator_generates_the_right_expression_for_the_greater_than_year_lookup