from typing import Dict
import csv


def load_subjects(csvfile: str) -> Dict:
    """Load a list of subjects from a csv file along with metadata
    
    Subject,Age,Gender,Acquisition,Release
    195041,31-35,F,Q07,S500
    ...

    Return a dictionary with Subjects as keys and Age as the value
    """

    result: Dict = {}
    with open(csvfile, 'r', encoding='utf-8-sig') as fd:
        reader: csv.DictReader = csv.DictReader(fd)
        for row in reader:
            if 'Age' in row:
                result[row['Subject']] = {'age': row['Age'], 'gender': row['Gender']}
            else:
                result[row['Subject']] = {}

    return result