code: def check_requirements():
      """Make sure all listed packages from requirements.txt have been installed into the virtualenv at boot."""
      if not os.path.exists(REQUIREMENTS):
          sys.exit(
              ansi.error()
              + " %s is missing. Please check it in."
              % ansi.underline(REQUIREMENTS)
          )
  
      with open(REQUIREMENTS, "r", encoding="utf-8") as f:
          dependencies = f.readlines()
  
      vcs = [
          d
          for d in dependencies
          if re.match(r"^(-e )?(git|svn|hg|bzr).*", d)
      ]
  
      dependencies = list(set(dependencies) - set(vcs))
  
      missing = []
      try:
          pkg_resources.require(dependencies)
      except (
          pkg_resources.ContextualVersionConflict,
          pkg_resources.DistributionNotFound,
          pkg_resources.VersionConflict,
      ) as error:
          missing.append(str(error))
      except pkg_resources.RequirementParseError:
          pass
  
      if missing:
          missing = " missing requirement:\n  " + os.linesep.join(
              missing
          )
          if "--env-checked" in sys.argv:
              sys.exit(
                  ansi.error()
                  + missing
                  + "\nRequirement installation failure, please check for errors in:\n $ lore install\n"
              )
          else:
              print(ansi.warning() + missing)
              import lore.__main__
  
              lore.__main__.install_requirements(None)
              reboot("--env-checked")
  
imports: from __future__ import absolute_import, print_function, unicode_literals
  import glob
  import locale
  import os
  import re
  import socket
  import subprocess
  import sys
  import platform
  from io import open
  import pkg_resources
  from lore import ansi
label_desc: Use image node_id 8 for calling a global function with example usage: check_requirements() without return types