code: def convert_dict_to_df(
      predictions: Dict[
          str, Dict[str, Union[List[Any], torch.Tensor, np.array]]
      ]
  ) -> pd.DataFrame:
      """Converts a dictionary of predictions into a pandas DataFrame.
  
      Example format of predictions dictionary:
  
      {
          "binary_C82EB": {
              "predictions": torch.tensor([True, True, True, False]),
              "probabilities": torch.tensor([[0.4777, 0.5223], [0.4482, 0.5518], [0.4380, 0.5620], [0.5059, 0.4941]]),
          },
          "category_1491D": {
              "predictions": ["NkNUG", "NkNUG", "NkNUG", "NkNUG"],
              "probabilities": torch.tensor(
                  [
                      [0.1058, 0.4366, 0.1939, 0.2637],
                      [0.0816, 0.4807, 0.1978, 0.2399],
                      [0.0907, 0.4957, 0.1829, 0.2308],
                      [0.0728, 0.5015, 0.1900, 0.2357],
                  ]
              ),
          },
          "num_7B25F": {"predictions": torch.tensor([2.0436, 2.1158, 2.1222, 2.1964])},
      }
      """
      output = {}
      for of_name, preds_dict in predictions.items():
          for key, value in preds_dict.items():
              output_key = f"{of_name}_{key}"
              if not isinstance(value, list):
                  value = value.tolist()
              output[output_key] = value
      return pd.DataFrame.from_dict(output)
  
file_path: ludwig/ludwig/data/postprocessing.py
imports: import os
  from typing import Any, Dict, List, Optional, Union
  import numpy
  import pandas
  import torch
  from ludwig.backend import LOCAL_BACKEND
  from ludwig.data.utils import convert_to_dict
  from ludwig.utils.data_utils import DATAFRAME_FORMATS, DICT_FORMATS
  from ludwig.utils.dataframe_utils import to_numpy_dataset
  from ludwig.utils.fs_utils import has_remote_protocol, open_file
  from ludwig.utils.misc_utils import get_from_registry
  from ludwig.utils.strings_utils import make_safe_filename
  from ludwig.utils.types import DataFrame
label_desc: Use image node_id 3 for calling a global function with example usage: convert_dict_to_df(predictions) and returns: pd