import random


def sample_lines(lines, proportion):
    """Sample a proportion of the lines to use for modification later.
    
    Arguments:
        lines: list of strings of documents
        proportion: float between 0 and 1 of proportion of documents to use
            in the sample

    Returns:
        a tuple of lists of strings (sampled_lines, unsampled_lines)
    """
    if proportion is None:
        n_samples = 1
    else:
        n_samples = int(len(lines) * proportion)
    lines_to_sample = set(random.sample(range(len(lines)), n_samples))

    sampled_lines = [(i, line) for i, line in enumerate(lines) if i in lines_to_sample]
    unsampled_lines = [(i, line) for i, line in enumerate(lines) if i not in lines_to_sample]
    return sampled_lines, unsampled_lines