code: def suggest_filename(file_path, exists=None):
      
      import os.path
      import re
      if not isinstance(exists, bool):
          exists = os.path.exists(file_path)
  
      if exists:
          file_path, file_extension = os.path.splitext(file_path)
          # print(file_path)
          m = re.search(r"_\d+$", file_path)
          if m is None:
              # cislo = 2
              new_cislo_str = "_2"
          else:
              cislostr = (m.group())
              cislo = int(cislostr[1:]) + 1
              # it is normal number
              file_path = file_path[:-len(cislostr)]
              new_cislo_str = "_" + str(cislo)
  
          file_path = file_path + new_cislo_str + file_extension  # .zfill(2)
          # trorcha rekurze
          file_path = suggest_filename(file_path)
  
      return file_path
docs: Try if exist path and append number to its end.
      For debug you can set as input if file exists or not.