<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def get_families(data_dir=None):
    '''Return a list of all basis set families'''
    data_dir = fix_data_dir(data_dir)
    metadata = get_metadata(data_dir)

    families = set()
    for v in metadata.values():
        families.add(v['family'])

    return sorted(list(families))