def GetAgeWeightFirst(table):
    """Get sequences of mother's age, birth weight, and first baby flag.

    Args:
        table: Table object

    Returns:
        tuple of sequences (ages, weights, first_bool)
    """
    ages = []
    weights = []
    first_bool = []
    for r in table.records:
        if 'NA' in [r.agepreg, r.totalwgt_oz, r.birthord]:
            continue

        # first is 1.0 for first babies; 0.0 for others
        if r.birthord == 1:
            first = 1.0
        else:
            first = 0.0
        
        ages.append(r.agepreg)
        weights.append(r.totalwgt_oz)
        first_bool.append(first)

    return ages, weights, first_bool