<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _edit_tags(self, tag, items, locked=True, remove=False):
 """ Helper to edit and refresh a tags. Parameters: tag (str):
 tag name items (list):
 list of tags to add locked (bool):
 lock this field. remove (bool):
 If this is active remove the tags in items. """

        if not isinstance(items, list):
            items = [items]
        value = getattr(self, tag + 's')
        existing_cols = [t.tag for t in value if t and remove is False]
        d = tag_helper(tag, existing_cols + items, locked, remove)
        self.edit(**d)
        self.refresh()