def get_results(arg):
 bookmarks = tower.get_bookmarks(BOOKMARKS_FILE)
 if (arg == ''):
  results = sorted(bookmarks, key=(lambda x: x.sort_order))
 else:
  titles = alp.fuzzy_search(arg, bookmarks, key=(lambda x: x.title))
  paths = alp.fuzzy_search(arg, bookmarks, key=(lambda x: x.path))
  results = set(titles).union(set(paths))
 return results

def get_results ( arg ) : bookmarks = tower . get_bookmarks ( BOOKMARKS_FILE ) if ( arg == '' ) : results = sorted ( bookmarks , key = ( lambda x : x . sort_order ) ) else : titles = alp . fuzzy_search ( arg , bookmarks , key = ( lambda x : x . title ) ) paths = alp . fuzzy_search ( arg , bookmarks , key = ( lambda x : x . path ) ) results = set ( titles ) . union ( set ( paths ) ) return results
returns a list of bookmark objects after a title search based on the given arg .