code: def _find_path(starts_from, check):
      p = os.path.realpath(starts_from)
      while True:
          if check(p):
              return p
          next_p = os.path.dirname(p)
          if next_p == p:
              return None
          p = next_p
  
label_desc: Use image node_id 3 for calling a global function with example usage: _find_path(starts_from, check) and returns: p, None