code: def _is_within_directory(directory, target):
      abs_directory = os.path.abspath(directory)
      abs_target = os.path.abspath(target)
  
      prefix = os.path.commonprefix([abs_directory, abs_target])
  
      return prefix == abs_directory
  
imports: import collections.abc
  import contextlib
  import fnmatch
  import hashlib
  import os
  import pickle
  import shutil
  import sys
  import tarfile
  import time
  import urllib
  import warnings
  import zipfile
  from pathlib import Path
  import numpy
  import requests
  from .._utils import fill_doc
  from .utils import get_data_dirs
label_desc: Use image node_id 10 for calling a global function with example usage: _is_within_directory(directory, target) and returns: unknown