code: def get_archive_type(path):
      """
      Returns the contents type for the provided archive path.
  
      Parameters
      ----------
      path : string
          Directory to evaluate.
  
      Returns
      -------
      Returns a string of: sarray, sframe, sgraph. Raises TypeError for anything else.
      """
      if not is_directory_archive(path):
          raise TypeError(
              "Unable to determine the type of archive at path: %s"
              % path
          )
  
      try:
          ini_path = "/".join(
              [_convert_slashes(path), "dir_archive.ini"]
          )
          parser = _ConfigParser.SafeConfigParser()
          parser.read(ini_path)
  
          contents = parser.get("metadata", "contents")
          return contents
      except Exception as e:
          raise TypeError(
              "Unable to determine type of archive for path: %s" % path,
              e,
          )
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import os
  import urllib
  import re
  import itertools
  import uuid
  import datetime
  import sys
  from ._sframe_generation import generate_random_sframe
  from ._sframe_generation import generate_random_regression_sframe
  from ._sframe_generation import generate_random_classification_sframe
  from ._type_checks import _raise_error_if_not_of_type
  from ._type_checks import _is_non_string_iterable
  from ._progress_table_printer import ProgressTablePrinter
label_desc: Use image node_id 7 for calling a global function with example usage: get_archive_type(path) and returns: contents