code: def _check_image_file(path):
      img_end = {
          "jpg",
          "bmp",
          "png",
          "jpeg",
          "rgb",
          "tif",
          "tiff",
          "gif",
      }
      return any([path.lower().endswith(e) for e in img_end])
  
file_path: PaddleOCR/deploy/pdserving/ocr_cpp_client.py
imports: from paddle_serving_client import Client
  import sys
  import numpy
  import base64
  import os
  import cv2
  from paddle_serving_app.reader import Sequential, URL2Image, ResizeByFactor
  from paddle_serving_app.reader import Div, Normalize, Transpose
  from ocr_reader import OCRReader
  import codecs
  import paddle
label_desc: Use image node_id 2 for calling a global function with example usage: _check_image_file(path) and returns: any