code: def read_cutset_from_config(config) -> Tuple[CutSet, bool]:
      """
      Reads NeMo configuration and creates a CutSet either from Lhotse or NeMo manifests.
  
      Returns a tuple of ``CutSet`` and a boolean indicating whether the data is tarred (True) or not (False).
      """
      # First, we'll figure out if we should read Lhotse manifest or NeMo manifest.
      use_nemo_manifest = all(
          config[opt] is None for opt in ("cuts_path", "shar_path")
      )
      if use_nemo_manifest:
          assert (
              config.manifest_filepath is not None
          ), "You must specify either: manifest_filepath, lhotse.cuts_path, or lhotse.shar_path"
          is_tarred = config.tarred_audio_filepaths is not None
      else:
          is_tarred = config.shar_path is not None
      if use_nemo_manifest:
          # Read NeMo manifest -- use the right wrapper depending on tarred/non-tarred.
          cuts = read_nemo_manifest(config, is_tarred)
      else:
          # Read Lhotse manifest (again handle both tarred(shar)/non-tarred).
          cuts = read_lhotse_manifest(config, is_tarred)
      return cuts, is_tarred
  
file_path: NeMo/nemo/collections/common/data/lhotse/cutset.py
imports: import logging
  import warnings
  from pathlib import Path
  from typing import Sequence, Tuple
  from lhotse import CutSet
  from nemo.collections.common.data.lhotse.nemo_adapters import LazyNeMoIterator, LazyNeMoTarredIterator
label_desc: Use image node_id 1 for calling a global function with example usage: read_cutset_from_config(config) and returns: cuts,  is_tarred