import re


def pascal_to_space(text):
    """
    Takes a string in PascalCaseFormatting and attempts to detect
    any word boundaries. Spaces are inserted in detected word boundaries
    and the modified string is returned.
    """
    # We only match if we have a lowercase letter followed by an uppercase one.
    # We do not account for internal spaces existing.
    result = re.sub(r'(?<=[a-z])(?=[A-Z])', ' ', text, flags=re.U | re.M)
    return result.title()