code: def match_patterns(pathname, patterns):
      
      for pattern in patterns:
          if fnmatch(pathname, pattern):
              return True
      return False
docs: Returns ``True`` if the pathname matches any of the given patterns.