Understanding splitBlockKeepMarks to extend it to support block marks

Hi, I am looking to extend splitBlockKeepMarks to work for block marks that I have for paragraphs (indent and alignment).

I just don’t really get what this part of the code is trying to do.

Any help would be greatly appreciated.