human
Complete the below
def bind_table_action(action_name):

    ''''Decorator to bind table region method to an actual table action button.
    Many table actions when started (by clicking a corresponding button
    in UI) lead to some form showing up. To further interact with this form,
    a Python/ Selenium wrapper needs to be created for it. It is very
    convenient to return this newly created wrapper in the same method that
    initiates clicking an actual table action button. Binding the method to a
    button is performed behind the scenes in this decorator.
    .. param:: action_name
    Part of the action button id which is specific to action itself. It
    is safe to use action `name` attribute from the dashboard tables.py
    code.'
    '''
assistant
#Here is the Python program you requested.
    _actions_locator = (by.By.CSS_SELECTOR, 'div.table_actions    >    button,    div.table_actions    >    a')
    def decorator(method):
        @functools.wraps(method)
        def wrapper(table):
            actions = table._get_elements(*_actions_locator)
            action_element = None
            for action in actions:
                target_action_id = ('%s__action_%s' % (table.name, action_name))
                if (action.get_attribute('id') == target_action_id):
                    action_element = action
                    break
            if (action_element is None):
                msg = ("Could    not    bind    method    '%s'    to    action    control    '%s'" % (method.__name__, action_name))
                raise ValueError(msg)
            return method(table, action_element)
        return wrapper
    return decorator