code: def is_local_and_existing_uri(uri):
      parsed_uri = urlparse(uri)
  
      log4Error.invalidInputError(
          not parsed_uri.scheme or parsed_uri.scheme == "file",
          "Not Local File!",
      )
  
      log4Error.invalidInputError(
          not parsed_uri.netloc
          or parsed_uri.netloc.lower() == "localhost",
          "Not Local File!",
      )
  
      log4Error.invalidInputError(
          exists(parsed_uri.path), "File Not Exist!"
      )
  
imports: import argparse
  import os
  import zipfile
  import pandas
  from PIL import Image
  import tensorflow
  from tensorflow.python.keras import layers
  from tensorflow.python.keras import losses
  from tensorflow.python.keras import models
  from tensorflow.python.keras import backend
  import matplotlib.image
  import matplotlib.pyplot
  from sklearn.model_selection import train_test_split
  import numpy
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.orca.data import XShards
  from bigdl.orca.learn.tf.estimator import Estimator
  from urllib.parse import urlparse
  from os.path import exists
  from bigdl.dllib.utils import log4Error
label_desc: Use image node_id 1 for calling a global function with example usage: is_local_and_existing_uri(uri) without return types