def remove_cases(request, run_ids, case_ids):
    """Remove one or more cases from the selected test runs.

    :param run_ids: give one or more run IDs. It could be an integer, a
        string containing comma separated IDs, or a list of int each of them is
        a run ID.
    :type run_ids: int, str or list
    :param case_ids: give one or more case IDs. It could be an integer, a
        string containing comma separated IDs, or a list of int each of them is
        a case ID.
    :type case_ids: int, str or list
    :return: a list which is empty on success or a list of mappings with
        failure codes if a failure occured.
    :rtype: list

    Example::

        # Remove case 10 from run 1
        TestRun.remove_cases(1, 10)
        # Remove case ids list [10, 20] from run list [1, 2]
        TestRun.remove_cases([1, 2], [10, 20])
        # Remove case ids list '10, 20' from run list '1, 2' with String
        TestRun.remove_cases('1, 2', '10, 20')
    """
    trs = TestRun.objects.filter(run_id__in=pre_process_ids(run_ids))
    for tr in trs.iterator():
        crs = TestCaseRun.objects.filter(run=tr, case__in=pre_process_ids(case_ids))
        crs.delete()