
            return ret

    def add(self, action, tofront=False):
        &#34;&#34;&#34;
        Add an action to the list of existing actions.

        Args:
            action: the action to add
            tofront: if True, add as first instead of last action
        &#34;&#34;&#34;
        if tofront:
            self.actions.insert(0, action)
        else:
            self.actions.append(action)


class AddAnn:
    &#34;&#34;&#34;
    Action for adding an annotation.
    &#34;&#34;&#34;

    def __in