def parse_lines(self, lines):
        """
        Do the work of parsing each line
        """
        indent = ''
        level = 0

        if lines[0][0] == ' ' or lines[0][0] == '\t':
            raise CommandError("The first line in the file cannot start with a space or tab.")

        # This keeps track of the current parents at a given level
        current_parents = {0: None}

        for line in lines:
            if len(line) == 0:
                continue
            if line[0] == ' ' or line[0] == '\t':
                if indent == '':
                    indent = self.get_indent(line)
                elif not indent in line[0]:
                    raise CommandError("You can't mix spaces and tabs for indents")
                level = line.count(indent)
                current_parents[level] = self.make_category(line, parent=current_parents[level - 1])
            else:
                # We are back to a zero level, so reset the whole thing
                current_parents = {0: self.make_category(line)}
        current_parents[0]._tree_manager.rebuild()
dataset/ETHPy150Open callowayproject/django-categories/categories/management/commands/import_categories.py/Command.parse_lines/swapped operands of `in`