import requests


def get_source_autoannotations(sourceid):
    """Fetch a specific source's autoannotations from the GROWTH marshal and
    create a string with the autoannotations available."""
    r = requests.post(
        'http://skipper.caltech.edu:8080/cgi-bin/growth/source_summary.cgi',
        data={'sourceid': str(sourceid)})
    r.raise_for_status()
    summary = r.json()
    autoannotations = summary['autoannotations']
    autoannotations_string = '; '.join(
        f"{auto['username']}, {auto['type']}, {auto['comment']}"
        for auto in autoannotations)

    return autoannotations_string