code: def is_path_in_dir(path, base_dir):
      return resolve_path(os.path.join(base_dir, path)).startswith(
          base_dir
      )
  
imports: import hashlib
  import os
  import pathlib
  import re
  import shutil
  import tarfile
  import urllib
  import warnings
  import zipfile
  from urllib.request import urlretrieve
  from keras.api_export import keras_export
  from keras.backend import config
  from keras.utils import io_utils
  from keras.utils.module_utils import gfile
  from keras.utils.progbar import Progbar
label_desc: Use image node_id 3 for calling a global function with example usage: is_path_in_dir(path, base_dir) and returns: resolve_path