code: def install_samples(url=None, directory=None, quiet=False):
      """
      Fetch the CNTK samples from a URL, extract to local directory, and install
      Python package requirements.
  
      Args:
          url: the URL of the sample zip file (if passed ``None``, which is default,
           the sample URL matching the CNTK module release is chosen)
          directory: the directory to extract the samples into (if passed
           ``None``, which is default, a name matching the CNTK module release is
           chosen, ``CNTK-Samples-<version>``)
          quiet: whether to suppress all output (defaults to ``False``)
      """
  
      def show_message(text):
          if not quiet:
              print(
                  textwrap.fill(text, subsequent_indent=" " * 4), "\n"
              )
  
      if not url:
          if module_is_unreleased():
              show_message(
                  "WARNING: You are not on a released CNTK module version. "
                  "When running into problems running samples, please check "
                  "https://github.com/Microsoft/CNTK for updated versions"
              )
          url = default_sample_url()
  
      if not directory:
          directory = default_sample_dir()
  
      if os.path.lexists(directory) and not (
          os.path.isdir(directory) and len(os.listdir(directory)) == 0
      ):
          raise ValueError(
              "directory %s must be non-existing or point to an empty directory"
              % (directory)
          )
  
      zip_filename = None
      try:
          show_message("INFO: retrieving " + url)
          zip_filename, message = urlretrieve(url)
          show_message("INFO: unzipping to directory " + directory)
          with zipfile.ZipFile(zip_filename, "r") as zip_file:
              zip_file.extractall(directory)
          requirements_file = os.path.join(
              directory, "requirements.txt"
          )
          if os.path.isfile(requirements_file):
              show_message("INFO: installing requirements")
              pip.main(["install", "-r", requirements_file])
          else:
              show_message(
                  "WARNING: file %s does not exist, modules to run the samples may be missing"
                  % (requirements_file)
              )
      finally:
          if zip_filename:
              os.remove(zip_filename)
  
file_path: CNTK/bindings/python/cntk/sample_installer.py
imports: from __future__ import print_function
  import sys
  import os
  import warnings
  import textwrap
  import zipfile
  import string
  import pip
  from cntk import __version__
label_desc: Use image node_id 4 for calling a global function with example usage: install_samples(url, directory, quiet) without return types