code: def _archive_inferred(archivepath):
      """return archive class object, inferred from the archivepath extension
  
      archivepath: the string file path to the archive
      """
      import os
      import klepto.archives as ka
  
      SQL_EXT = (".sql", ".sqlite", ".mdf")
      ext = os.path.splitext(archivepath)[-1]
      if (
          ext in SQL_EXT
          or "sql" in ext
          or ext.startswith((".sq", ".mysq", ".pg", ".post"))
      ):
          return (
              ka.sqltable_archive
              if _isdir(archivepath)
              else ka.sql_archive
          )
      HDF_EXT = (".hdf", ".h5", ".hdf5")
      if ext in HDF_EXT or "hdf" in ext or ext.startswith(".h"):
          return (
              ka.hdfdir_archive
              if _isdir(archivepath)
              else ka.hdf_archive
          )
      # DBX_EXT = ('.db','.ar','.klp','.txt')
      return ka.dir_archive if _isdir(archivepath) else ka.file_archive
  
imports: from collections.abc import Callable
label_desc: Use image node_id 4 for calling a global function with example usage: _archive_inferred(archivepath) and returns: unknown, unknown, unknown