def write(self):
        folder_path = self.folder.get_path(constants.TICKET_DETAILS)

        used_fields = set(self.get_used_per_ticket_fields())
        requested_fields = set(self.get_requested_per_ticket_fields())

        with io.open(folder_path, 'w', encoding='utf-8') as out:
            for field in sorted(self.keys()):
                if used_fields | requested_fields not in field:
                    out.write(
                        u'* {human} ({field}):\n'.format(
                            human=self.get_human_name_for_field(field),
                            field=field,
                        )
                    )

                    field_string = self[field]
                    if field_string is None:
                        field_string = ''
                    elif not isinstance(field_string, six.string_types):
                        field_string = json.dumps(
                            field_string,
                            sort_keys=True,
                            indent=4,
                            ensure_ascii=False,
                        )

                    # Each line is preceded by 4 spaces of whitespace
                    padded_lines = [
                        u'    %s\n' % f for f in field_string.split('\n')
                    ]
                    for line in padded_lines:
                        out.write(line)
                else:
                    field_path = constants.TICKET_FILE_FIELD_TEMPLATE.format(
                        field_name=field
                    )
                    with io.open(field_path, 'w', encoding='utf-8') as fout:
                        fout.write(self[field])
                        fout.write(u'\n')
dataset/ETHPy150Open coddingtonbear/jirafs/jirafs/jirafieldmanager.py/WorkingCopyJiraFieldManager.write/swapped operands of `not in`