def get_sample_cases(test_cases, case_type):
    """ Returns a dictionary of input/output cases"""

    sample_cases = test_cases.find_all('div', class_=case_type)
    sample_cases = [case.pre for case in sample_cases]
    test_cases = {}

    for index, each_case in enumerate(sample_cases):
        lines = []
        for line in each_case.children:
            if line.string != None:
                lines.append(line)

        test_cases[index] = '\n'.join(lines).strip().replace('\r', '')

    return test_cases