code: def isOleFile(filename):
      """
      Test if a file is an OLE container (according to the magic bytes in its header).
  
      .. note::
          This function only checks the first 8 bytes of the file, not the
          rest of the OLE structure.
  
      .. versionadded:: 0.16
  
      :param filename: filename, contents or file-like object of the OLE file (string-like or file-like object)
  
          - if filename is a string smaller than 1536 bytes, it is the path
            of the file to open. (bytes or unicode string)
          - if filename is a string longer than 1535 bytes, it is parsed
            as the content of an OLE file in memory. (bytes type only)
          - if filename is a file-like object (with read and seek methods),
            it is parsed as-is.
  
      :type filename: bytes or str or unicode or file
      :returns: True if OLE, False otherwise.
      :rtype: bool
      """
      # check if filename is a string-like or file-like object:
      if hasattr(filename, "read"):
          # file-like object: use it directly
          header = filename.read(len(MAGIC))
          # just in case, seek back to start of file:
          filename.seek(0)
      elif (
          isinstance(filename, bytes)
          and len(filename) >= MINIMAL_OLEFILE_SIZE
      ):
          # filename is a bytes string containing the OLE file to be parsed:
          header = filename[: len(MAGIC)]
      else:
          # string-like object: filename of file on disk
          with open(filename, "rb") as fp:
              header = fp.read(len(MAGIC))
      if header == MAGIC:
          return True
      else:
          return False
  
imports: from __future__ import print_function
  import io
  import sys
  import struct, array, os.path, datetime, logging
label_desc: Use image node_id 3 for calling a global function with example usage: isOleFile(filename) and returns: True, False