code: def infer_or_load_unischema(dataset):
      """Try to recover Unischema object stored by ``materialize_dataset`` function. If it can be loaded, infer
      Unischema from native Parquet schema"""
      try:
          return get_schema(dataset)
      except PetastormMetadataError:
          logger.info(
              "Failed loading Unischema from metadata in %s. Assuming the dataset was not created with "
              "Petastorm. Will try to construct from native Parquet schema."
          )
          return Unischema.from_arrow_schema(dataset)
  
imports: import json
  import logging
  import os
  from concurrent import futures
  from contextlib import contextmanager
  from operator import attrgetter
  from urllib.parse import urlparse
  from packaging import version
  from pyarrow import parquet
  from six.moves import cPickle
  from petastorm import utils
  from petastorm.etl.legacy import depickle_legacy_package_name_compatible
  from petastorm.fs_utils import FilesystemResolver, get_filesystem_and_path_or_paths, get_dataset_path
  from petastorm.unischema import Unischema
label_desc: Use image node_id 12 for calling a global function with example usage: infer_or_load_unischema(dataset) and returns: get_schema, Unischema