code: def _get_matcher(self, target):
          
  
          if target is None:
              matcher = None
          elif isinstance(target, (str, bytes)):
              # Plain text match
              if not self.case_sensitive:
                  match = target.lower()
              else:
                  match = target
              matcher = functools.partial(self._match_literal, b=match)
          else:
              # File match pattern
              matcher = target.match
          return matcher
docs: Get deep match.