docstr: :param profile: Either a string representing a filename,
      a file like object containing a profile or a
      low-level profile object
docstr_tok: [":","param","profile",":","Either","a","string","representing","a","filename",",","a","file","like","object","containing","a","profile","or","a","low-level","profile","object"]
code: def __init__(self, profile):
      """
      :param profile: Either a string representing a filename,
          a file like object containing a profile or a
          low-level profile object
  
      """
  
      if isinstance(profile, str):
          if sys.platform == "win32":
              profile_bytes_path = profile.encode()
              try:
                  profile_bytes_path.decode("ascii")
              except UnicodeDecodeError:
                  with open(profile, "rb") as f:
                      self._set(core.profile_frombytes(f.read()))
                  return
          self._set(core.profile_open(profile), profile)
      elif hasattr(profile, "read"):
          self._set(core.profile_frombytes(profile.read()))
      elif isinstance(profile, _imagingcms.CmsProfile):
          self._set(profile)
      else:
          raise TypeError("Invalid type for Profile")
  
imports: import sys
  from PIL import Image
label_desc: Use image node_id 1 to create a new ImageCmsProfile object  with example: obj = ImageCmsProfile(profile)