code: def _match_auto(self, screen, search_img, threshold):
          
          # 1. try template first
          ret = ac.find_template(screen, search_img)
          if ret and ret['confidence'] > threshold:
              return FindPoint(ret['result'], ret['confidence'], consts.IMAGE_MATCH_METHOD_TMPL, matched=True)
  
          # 2. try sift
          ret = ac.find_sift(screen, search_img, min_match_count=10)
          if ret is None:
              return None
  
          matches, total = ret['confidence']
          if 1.0*matches/total > 0.5: # FIXME(ssx): sift just write here
              return FindPoint(ret['result'], ret['confidence'], consts.IMAGE_MATCH_METHOD_SIFT, matched=True)
          return None
docs: Maybe not a good idea