code: def get_filter(filetypes, ext):
      
      if not ext:
          return ALL_FILTER
      for title, ftypes in filetypes:
          if ext in ftypes:
              return _create_filter(title, ftypes)
      else:
          return ''
docs: Return filter associated to file extension