def METHOD_NAME(
    testSuiteOrCase: Union[pyunit.TestCase, pyunit.TestSuite]
) -> Iterator[itrial.ITestCase]:
    """
    Iterate through all of the test cases in C{testSuiteOrCase}.
    """
    try:
        suite = iter(testSuiteOrCase)  # type: ignore[arg-type]
    except TypeError:
        yield testSuiteOrCase  # type: ignore[misc]
    else:
        for test in suite:
            yield from METHOD_NAME(test)