code: def get_datasets_output_features(
      dataset: str = None,
      include_competitions: bool = True,
      include_data_modalities: bool = False,
  ) -> dict:
      """Returns a dictionary with the output features for each dataset. Optionally, you can pass a dataset name
      which will then cause the function to return a dictionary with the output features for that dataset.
  
      Because Hugging Face Datasets are loaded dynamically through a shared connector, they don't have fixed output
      features. As such, we exclude Hugging Face datasets here.
  
      :param dataset: (str) name of the dataset
      :param include_competitions: (bool) whether to include the output features from kaggle competition datasets
      :param include_data_modalities: (bool) whether to include the data modalities associated with the prediction task
      :return: (dict) dictionary with the output features for each dataset or a dictionary with the output features for
                      the specified dataset
      """
      ordered_configs = OrderedDict(
          sorted(_get_dataset_configs().items())
      )
      competition_datasets = []
      hugging_face_datasets = []
  
      for name, config in ordered_configs.items():
          if not include_competitions and config.kaggle_competition:
              competition_datasets.append(name)
              continue
  
          if config.name == "hugging_face":
              # There is no output_features attribute for hugging_face datasets
              hugging_face_datasets.append(name)
              continue
  
          ordered_configs[name] = {
              "name": config.name,
              "output_features": config.output_features,
          }
  
          if include_data_modalities:
              column_types = {column[TYPE] for column in config.columns}
  
              data_modalities = set()
              if (
                  NUMBER in column_types
                  or CATEGORY in column_types
                  or BINARY in column_types
              ):
                  data_modalities.add("Tabular")
              if TEXT in column_types:
                  data_modalities.add("Text")
              if IMAGE in column_types:
                  data_modalities.add("Image")
              if AUDIO in column_types:
                  data_modalities.add("Audio")
  
              ordered_configs[name]["data_modalities"] = data_modalities
  
      if dataset:
          return ordered_configs[dataset]
  
      if not include_competitions:
          for competition in competition_datasets:
              del ordered_configs[competition]
  
      del ordered_configs["hugging_face"]
  
      return ordered_configs
  
imports: import argparse
  import importlib
  import logging
  import os
  from collections import OrderedDict
  from functools import lru_cache
  from io import BytesIO
  from typing import Any, Dict, List, Literal, Optional, Tuple, Union
  import yaml
  from ludwig.api_annotations import DeveloperAPI, PublicAPI
  from ludwig.backend.base import Backend
  from ludwig.constants import AUDIO, BINARY, CATEGORY, IMAGE, NUMBER, TEST, TEXT, TRAIN, TYPE, VALIDATION
  from ludwig.data.cache.types import CacheableDataframe
  from ludwig.datasets import configs
  from ludwig.datasets.dataset_config import DatasetConfig
  from ludwig.datasets.loaders.dataset_loader import DatasetLoader
  from ludwig.datasets.utils import model_configs_for_dataset
  from ludwig.globals import LUDWIG_VERSION
  from ludwig.utils.print_utils import print_ludwig
  from ludwig.utils.types import DataFrame
label_desc: Use image node_id 11 for calling a global function with example usage: get_datasets_output_features(dataset, include_competitions, include_data_modalities) and returns: ordered_configs, ordered_configs