code: def should_use_ideep(level):
      """Determines if we should use iDeep.
  
      This function checks ``chainer.config.use_ideep`` and availability
      of ``ideep4py`` package.
  
      Args:
          level (str): iDeep use level. It must be either ``'==always'`` or
              ``'>=auto'``. ``'==always'`` indicates that the ``use_ideep``
              config must be ``'always'`` to use iDeep.
  
      Returns:
          bool: ``True`` if the caller should use iDeep.
  
      """
      if not is_ideep_available():
          return False
  
      # TODO(niboshi):
      # Add lowest_version argument and compare with ideep version.
      # Currently ideep does not provide a way to retrieve its version.
  
      if level not in _SHOULD_USE_IDEEP:
          raise ValueError(
              "invalid iDeep use level: %s "
              '(must be either of "==always" or ">=auto")' % repr(level)
          )
  
      flags = _SHOULD_USE_IDEEP[level]
  
      use_ideep = config.use_ideep
      if use_ideep not in flags:
          raise ValueError(
              "invalid use_ideep configuration: %s "
              '(must be either of "always", "auto", or "never")'
              % repr(use_ideep)
          )
      return flags[use_ideep]
  
file_path: chainer/chainer/backends/intel64.py
imports: from __future__ import absolute_import
  import numpy
  import chainer
  from chainer import _backend
  from chainer.backends import _cpu
  from chainer.configuration import config
label_desc: Use image node_id 3 for calling a global function with example usage: should_use_ideep(level) and returns: flags, False