code: def __init__(
      self,
      result,
      patterns,
      type=None,
      regex=False,
      sentinel=None,
      size_gt=None,
      size_lt=None,
      max_matches=None,
  ):
      self.result = result
      if isinstance(patterns, str):
          patterns = [patterns]
      if not regex:
          patterns = _native_paths(patterns)
      self.patterns = patterns
      self.regex = regex
      self._patterns_match = self._patterns_match_f(patterns, regex)
      self.type = self._validate_type(type)
      self.sentinel = sentinel
      self.size_gt = size_gt
      self.size_lt = size_lt
      self.max_matches = max_matches
      self._matches = 0
  
imports: import fnmatch
  import glob
  import logging
  import os
  import re
  import shutil
  from guild import util
label_desc: Use image node_id 1 to create a new FileSelectRule object  with example: obj = FileSelectRule(result, patterns, type, regex, sentinel, size_gt, size_lt, max_matches)