code: def isIntentSupported(profile, intent, direction):
      """
      (pyCMS) Checks if a given intent is supported.
  
      Use this function to verify that you can use your desired
      renderingIntent with profile, and that profile can be used for the
      input/output/proof profile as you desire.
  
      Some profiles are created specifically for one "direction", can cannot
      be used for others.  Some profiles can only be used for certain
      rendering intents... so it's best to either verify this before trying
      to create a transform with them (using this function), or catch the
      potential PyCMSError that will occur if they don't support the modes
      you select.
  
      :param profile: EITHER a valid CmsProfile object, OR a string of the
          filename of an ICC profile.
      :param intent: Integer (0-3) specifying the rendering intent you wish to
          use with this profile
  
              ImageCms.INTENT_PERCEPTUAL            = 0 (DEFAULT)
              ImageCms.INTENT_RELATIVE_COLORIMETRIC = 1
              ImageCms.INTENT_SATURATION            = 2
              ImageCms.INTENT_ABSOLUTE_COLORIMETRIC = 3
  
          see the pyCMS documentation for details on rendering intents and what
              they do.
      :param direction: Integer specifying if the profile is to be used for
          input, output, or proof
  
              INPUT  = 0 (or use ImageCms.DIRECTION_INPUT)
              OUTPUT = 1 (or use ImageCms.DIRECTION_OUTPUT)
              PROOF  = 2 (or use ImageCms.DIRECTION_PROOF)
  
      :returns: 1 if the intent/direction are supported, -1 if they are not.
      :exception PyCMSError:
      """
  
      try:
          if not isinstance(profile, ImageCmsProfile):
              profile = ImageCmsProfile(profile)
          # FIXME: I get different results for the same data w. different
          # compilers.  Bug in LittleCMS or in the binding?
          if profile.profile.is_intent_supported(intent, direction):
              return 1
          else:
              return -1
      except (AttributeError, IOError, TypeError, ValueError) as v:
          raise PyCMSError(v)
  
imports: from __future__ import print_function
  import sys
  from PIL import Image
  from PIL._util import isStringType
label_desc: Use image node_id 15 for calling a global function with example usage: isIntentSupported(profile, intent, direction) and returns: int, unknown