def METHOD_NAME(self, obj):
    """A recursive method that strips out extraneous spaces that precede line breaks.
    PyYaml disallows block styling for multiline strings if any of the lines has a space followed
    by a line break.
    DeepDiff will actually provide a difflib-style diff for multiline strings when there has
    been a value changed from one multiline string to another multiline string. However, when
    it produces that diff, every line ends with at least one space. This keeps it from being
    formatted as a block (the most useful way to display it) by PyYaml. Therefore, this function
    recurses into the deepdiff-generated data structure and strips all strings of those extraneous
    spaces that precede line breaks.
    :param obj: The DeepDiff generated diff dict (or some value this method has recursed into
        from that dict).
    :return: The object, stripped of extraneous spaces that precede line breaks.
    """
    if isinstance(obj, dict):
        return {
            key: self.METHOD_NAME(value)
            for key, value in obj.items()
        }
    elif isinstance(obj, list):
        return [self.METHOD_NAME(item) for item in obj]
    elif isinstance(obj, str):
        return re.sub("[ ]*\n", "\n", obj)
    else:
        return obj