def remove_and_record_multiple_spaces_in_line(line):
    """For a given string, locate all ocurrences of multiple spaces
       together in the line, record the number of spaces found at each
       position, and replace them with a single space.
       @param line: (string) the text line to be processed for multiple
        spaces.
       @return: (tuple) countaining a dictionary and a string. The
        dictionary contains information about the number of spaces removed
        at given positions in the line. For example, if 3 spaces were
        removed from the line at index '22', the dictionary would be set
        as follows: { 22 : 3 }
        The string that is also returned in this tuple is the line after
        multiple-space ocurrences have replaced with single spaces.
    """
    removed_spaces = {}
    # get a collection of match objects for all instances of
    # multiple-spaces found in the line:
    multispace_matches = re_group_captured_multiple_space.finditer(line)
    # record the number of spaces found at each match position:
    for multispace in multispace_matches:
        removed_spaces[multispace.start()] = \
            (multispace.end() - multispace.start() - 1)
    # now remove the multiple-spaces from the line, replacing with a
    # single space at each position:
    line = re_group_captured_multiple_space.sub(u' ', line)
    return (removed_spaces, line)