def METHOD_NAME(paths: Union[str, List[str]]) -> List[Any]:
    """
    Get the test cases from ttfw_idf under the given paths
    :param paths: list of paths to search
    """
    try:
        from ttfw_idf.IDFAssignTest import IDFAssignTest
    except ImportError:
        sys.path.append(os.path.join(IDF_PATH, 'tools', 'ci', 'python_packages'))
        from ttfw_idf.IDFAssignTest import IDFAssignTest
    # mock CI_JOB_ID if not exists
    if not os.environ.get('CI_JOB_ID'):
        os.environ['CI_JOB_ID'] = '1'
    cases = []
    for path in to_list(paths):
        assign = IDFAssignTest(path, os.path.join(IDF_PATH, '.gitlab', 'ci', 'target-test.yml'))
        with contextlib.redirect_stdout(None):  # swallow stdout
            try:
                cases += assign.search_cases()
            except ImportError as e:
                logging.error(str(e))
    return cases