class_docstr: Simple scanner
  
  All method patterns are regular expression strings (not
  compiled expressions!)
docstr: Apply `pattern` on the current position and return
  the match object. (Doesn't touch pos). Use this for
  lookahead.
code: def check(self, pattern):
      """
      Apply `pattern` on the current position and return
      the match object. (Doesn't touch pos). Use this for
      lookahead.
      """
      if self.eos:
          raise EndOfText()
      if pattern not in self._re_cache:
          self._re_cache[pattern] = re.compile(pattern, self.flags)
      return self._re_cache[pattern].match(self.data, self.pos)
  
file_path: catboost/contrib/python/Pygments/py2/pygments/scanner.py
imports: import re
label_desc: Use image node_id 3 for calling the Scanner obj's underlying member method code with example usage: obj.check(pattern) and returns: self