<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def needs_abort():
 """A command to abort an operation in progress For example a merge, cherry-pick or rebase If one of these operations has left the repo conflicted then give a command to abandon the operation """

    for line in status().splitlines():
        if '--abort' in line:
            for part in line.split('"'):
                if '--abort' in part:
                    return part
        elif 'All conflicts fixed but you are still merging' in line:
            return 'git merge --abort'
        elif 'You have unmerged paths.' in line:
            return 'git merge --abort'
        elif 'all conflicts fixed: run "git rebase --continue"' in line:
            return 'git rebase --abort'
    return None