code: def match_pattern(nm, patterns):
      
      patterns = coerce_to_list(patterns)
      for pat in patterns:
          if fnmatch.fnmatch(nm, pat):
              return True
      return False
docs: Compares `nm` with the supplied patterns, and returns True if it matches
      at least one.
  
      Patterns are standard file-name wildcard strings, as defined in the
      `fnmatch` module. For example, the pattern "*.py" will match the names
      of all Python scripts.