def get_samples_of_type(samples_dict, arrhythmia_type):
    """Returns a sub-dictionary of only the given arrhythmia type

    Arguments
    ---------
    samples_dict: dictionary mapping sample names to data associated
    with the given sample

    arrhythmia_type:
        'a': asystole
        'b': bradycardia
        't': tachycardia
        'f': ventricular fibrillation
        'v': ventricular tachycardia

    Returns
    -------
    a sub-dictionary with keys of only the given arrhythmia
    """

    subdict = {}

    for sample_name in samples_dict.keys():
        if sample_name[0] == arrhythmia_type:
            subdict[sample_name] = samples_dict[sample_name]

    return subdict