def METHOD_NAME(
    env_dirs: typing.Iterable[pathlib.Path],
    dirs: typing.Iterable[pathlib.Path],
    files: typing.Iterable[pathlib.Path],
) -> typing.Generator[pathlib.Path, None, None]:
    """
    Find all files which should testcases should be read from.
    The order is the following:
    1. Builtin testcases, defined in ``tbot.tc.callable``,
       eg. ``interactive_linux``
    2. A file named ``tc.py`` in the current working directory
       (affected by ``-C``)
    3. All python files (recursively) from a folder named
       ``tc/`` in the current working directory
    4. Python files (non recursively) from all paths in the
       ``$TBOTPATH`` environment variable
    5. All python files (recursively) from folders specified
       using ``-T``.
    6. Files specified using ``-t``
    :param env_dirs: Paths from ``$TBOTPATH``
    :param dirs: Paths from ``-T``
    :param files: Paths from ``-t``
    :returns: Generator over all testcase files
    """
    # Builtin testcases
    builtins = pathlib.Path(__file__).parent / "tc" / "callable.py"
    if builtins.is_file():
        yield builtins
    # tc.py file
    tcpy = pathlib.Path.cwd() / "tc.py"
    if tcpy.is_file():
        yield tcpy
    # tc/ folder
    tcdir = pathlib.Path.cwd() / "tc"
    if tcdir.is_dir():
        for f in list_dir(tcdir):
            yield f
    # Paths from $TBOTPATH
    for d in env_dirs:
        if d.is_dir():
            for f in list_dir(d, recurse=False):
                yield f
        else:
            if d.exists():
                raise NotADirectoryError(str(d))
            else:
                raise FileNotFoundError(str(d))
    # Specified testcase folders
    for d in dirs:
        if d.is_dir():
            for f in list_dir(d):
                yield f
        else:
            if d.exists():
                raise NotADirectoryError(str(d))
            else:
                raise FileNotFoundError(str(d))
    # Specified testcase files
    for f in files:
        if f.is_file():
            yield f
        else:
            raise FileNotFoundError(str(f))