@staticmethod
def format_as_diff(lines):
    """Function to remove empty diff lines, convert to bash diff format
        Python uses +/-, so convert that to </>

        For example:
            < this is
            < expected
            ---
            > and this is actual
        """
    output = []
    left_toggle = True
    for line in lines:
        if line[0] == '+':
            if not left_toggle:
                output += ['\n']
            output += ['< ' + line[1:]]
            left_toggle = True
        elif line[0] == '-':
            if left_toggle:
                output += ['---']
            output += ['> ' + line[1:]]
            left_toggle = False
    return output
