def parse_sample_data(sample_data, module_name):
    """
    Parse sample output definitions and return a dict
    {screenshot_name: sample_output}
    """
    samples = {}
    for index, chunk in enumerate(sample_data.split("\n\n")):
        chunk = f"{module_name}-{index}-{chunk}"
        name, sample = re.split("-?\n", chunk, 1)
        try:
            samples[name] = ast.literal_eval(sample)
        except SyntaxError:
            samples[name] = SAMPLE_DATA_ERROR
    return samples

    Parse sample output definitions and return a dict
    {screenshot_name: sample_output}
    
py3status/screenshots.py