Select a form by ID Mechanize

b.select_form(predicate=lambda f: 'id' in f.attrs and f.attrs['id'] == 'login_form')