code: def process_pattern(fn):
      
      directory, pattern = validate_pattern(fn)
      if directory is not None:
          filenames = fnmatch.filter(auto(listdir, directory), pattern)
          if filenames:
              return [directory + '/' + sfn for sfn in filenames]
          else:
              print_err("cannot access '{}': No such file or directory".format(fn))
docs: Return a list of paths matching a pattern (or None on error).