def convert_stubs_to_parents(asns, db):
    """Converts all stubs to parents.

    For our data, stub ASes have the same data as there parents. Because
    of this, we do not store stub data, and instead copy it from the
    parents.
    """
    list_of_asns = []
    sql = 'SELECT * FROM stubs WHERE stub_asn=%s'
    for asn in asns:
        results = db.execute(sql, [asn])
        if len(results) == 0:
            list_of_asns.append(asn)
        else:
            list_of_asns.append(results[0]['parent_asn'])
    return list_of_asns
