code: def search_ancestor(self, *node_types):
      node = self.parent
      while node is not None:
          if node.type in node_types:
              return node
          node = node.parent
      return None
  
file_path: catboost/contrib/python/parso/py3/parso/python/prefix.py
imports: import re
  from codecs import BOM_UTF8
  from typing import Tuple
  from parso.python.tokenize import group
label_desc: Use image node_id 5 for calling the PrefixPart obj's underlying member method code with example usage: obj.search_ancestor() and returns: None, node