def daterange_to_yaml(daterange):
    """Converts a tuple into a dict with 'Start' and optional 'End' keys"""
    if daterange[1] is None:
        return {'Start': daterange[0].date()}
    else:
        return {'Start': daterange[0].date(), 'End': daterange[1].date()}