def METHOD_NAME(data_factory, dates):
    practice_codes = set()
    for prescription in _filter_by_date(data_factory.prescribing, dates):
        practice_codes.add(prescription["practice"])
    for practice_stat in _filter_by_date(data_factory.practice_statistics, dates):
        practice_codes.add(practice_stat["practice"])
    return sorted(practice_codes)