Simplify start of cell marker when previous line is blank

def simplify_soc_marker(self, text, prev_text):
        """Simplify start of cell marker when previous line is blank"""
        if self.cell_marker_start:
            return text

        if self.is_code() and text and text[0] == self.comment + ' + {}':
            if not prev_text or not prev_text[-1].strip():
                text[0] = self.comment + ' +'

        return text