code: def has_ext(path_name, *, multiple=None, if_all_ext=False):
      
      base = os.path.basename(path_name)
      count = base.count(EXT)
  
      if not if_all_ext and base[0] == EXT and count != 0:
          count -= 1
  
      if multiple is None:
          return count >= 1
      elif multiple:
          return count > 1
      else:
          return count == 1
docs: Determine if the given path name has an extension