def format_gerald_header(flowcell_info):
    """
    Generate comment describing the contents of the flowcell
    """
    # I'm using '\n# ' to join the lines together, that doesn't include the
    # first element so i needed to put the # in manually
    config = ['# FLOWCELL: %s' % (flowcell_info['flowcell_id'])]
    config += ['']
    config += ['CONTROL-LANE: %s' % (flowcell_info['control_lane'],)]
    config += ['']
    config += ['Flowcell Notes:']
    config.extend(flowcell_info['notes'].split('\r\n'))
    config += ['']
    for lane_number in sorted(flowcell_info['lane_set']):
        lane_contents = flowcell_info['lane_set'][lane_number]
        for lane_info in lane_contents:
            config += ['Lane%s: %s | %s' % (lane_number,
                                            lane_info['library_id'],
                                            lane_info['library_name'])]

    config += ['']
    return "\n# ".join(config)