def _perform_action(self, params, return_dict=True):
action = self.get_data(<EOL>"<STR_LIT>" % self.id,<EOL>type=POST,<EOL>params=params<EOL>)<EOL>if return_dict:<EOL><INDENT>return action<EOL><DEDENT>else:<EOL><INDENT>action = action[u'<STR_LIT:action>']<EOL>return_action = Action(token=self.token)<EOL>for attr in action.keys():<EOL><INDENT>setattr(return_action, attr, action[attr])<EOL><DEDENT>return return_action<EOL><DEDENT>
Perform a droplet action.

Args:
    params (dict): parameters of the action

Optional Args:
    return_dict (bool): Return a dict when True (default),
        otherwise return an Action.

Returns dict or Action