code: def _fnmatch(self, filename, patterns, default=True):
          
          if not patterns:
              return default
          return any(fnmatch.fnmatch(filename, pattern) for pattern in patterns)
docs: Wrap :func:`fnmatch.fnmatch` to add some functionality.
  
          :param str filename:
              Name of the file we're trying to match.
          :param list patterns:
              Patterns we're using to try to match the filename.
          :param bool default:
              The default value if patterns is empty
          :returns:
              True if a pattern matches the filename, False if it doesn't.
              ``default`` if patterns is empty.