<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def actions(obj, **kwargs):
 """ Return actions available for an object """

    if 'exclude' in kwargs:
        kwargs['exclude'] = kwargs['exclude'].split(',')
    actions = obj.get_actions(**kwargs)
    if isinstance(actions, dict):
        actions = actions.values()
    buttons = "".join("%s" % action.render() for action in actions)
    return '<div class="actions">%s</div>' % buttons