code: def _check_optional_dependencies():
      for dep in chainer._version._optional_dependencies:
          name = dep["name"]
          pkgs = dep["packages"]
          spec = dep["specifier"]
          help = dep["help"]
          installed = False
          for pkg in pkgs:
              found = False
              requirement = pkg
              if (
                  os.environ.get("CHAINER_WARN_VERSION_MISMATCH", "1")
                  == "1"
              ):
                  requirement = "{}{}".format(pkg, spec)
              try:
                  pkg_resources.require(requirement)
                  found = True
              except pkg_resources.DistributionNotFound:
                  continue
              except pkg_resources.VersionConflict:
                  msg = """
  --------------------------------------------------------------------------------
  {name} ({pkg}) version {version} may not be compatible with this version of Chainer.
  Please consider installing the supported version by running:
    $ pip install '{requirement}'
  
  See the following page for more details:
    {help}
  --------------------------------------------------------------------------------
  """  # NOQA
                  warnings.warn(
                      msg.format(
                          name=name,
                          pkg=pkg,
                          version=pkg_resources.get_distribution(
                              pkg
                          ).version,
                          requirement=requirement,
                          help=help,
                      )
                  )
                  found = True
              except Exception:
                  warnings.warn(
                      "Failed to check requirement: {}".format(
                          requirement
                      )
                  )
                  break
  
              if found:
                  if installed:
                      warnings.warn(
                          """
  --------------------------------------------------------------------------------
  Multiple installations of {name} package has been detected.
  You should select only one package from from {pkgs}.
  Follow these steps to resolve this issue:
    1. `pip list` to list {name} packages installed
    2. `pip uninstall <package name>` to uninstall all {name} packages
    3. `pip install <package name>` to install the proper one
  --------------------------------------------------------------------------------
  """.format(
                              name=name, pkgs=pkgs
                          )
                      )
                  installed = True
  
file_path: chainer/chainer/_environment_check.py
imports: from __future__ import absolute_import
  import os
  import sys
  import warnings
  import numpy.distutils.system_info
  import pkg_resources
  import chainer
label_desc: Use image node_id 3 for calling a global function with example usage: _check_optional_dependencies() without return types