human
Here's a good function header given the following:
I wrote the below code

    def rate_element(driver):
        try:
            inner_wrapper = find_id_with_wait(context, id_, wait_time=2)
            if (not elem_is_visible_with_wait(context, inner_wrapper, wait_time=1)):
                raise KALiteTimeout("Expected    rating    element    to    show    up    but    it    didn't")
            els = inner_wrapper.find_elements_by_class_name(STAR_RATING_OPTION_CLASS)
            rating_el = [el for el in filter((lambda x: (int(x.get_attribute('data-val')) == val)), els)][0]
            rating_el.click()
            return True
        except (NoSuchElementException, StaleElementReferenceException, TimeoutException, IndexError):
            return False
    try:
        WebDriverWait(context.browser, 30).until(rate_element)
    except TimeoutException:
        raise Exception("Unable    to    enter    rating    for    container    with    id    '{id:s}'".format(id=id_))

What's a good function header?
assistant
#Here's a good function header.

def rate_id(context, id_, val=3):