def is_file_ignored(opts, fname):
    if opts['file_ignore_regex']:
        for regex in opts['file_ignore_regex']:
            if re.search(regex, fname):
                log.debug(
                    'File matching file_ignore_regex. Skipping: {0}'.format(
                        fname
                    )
                )
                return True

    if opts['file_ignore_glob']:
        for glob in opts['file_ignore_glob']:
            if fnmatch.fnmatch(fname, glob):
                log.debug(
                    'File matching file_ignore_glob. Skipping: {0}'.format(
                        fname
                    )
                )
                return True
    return False
:param code:
dataset/ETHPy150Open saltstack/salt/salt/fileserver/__init__.py/is_file_ignored--crossover with--dataset/ETHPy150Open ODM2/ODMToolsPython/odmtools/odmservices/series_service.py/SeriesService.create_qcl