code: def loss_output_dict(
      output: List[NDArray], schema: List[str]
  ) -> Dict[str, List[NDArray]]:
      """
      Creates a dictionary for loss output based on the output schema. If two output values have the same
      type string in the schema they are concatenated in the same dicrionary item.
      :param output: list of output values
      :param schema: list of type-strings for output values
      :return: dictionary of keyword to list of NDArrays
      """
      assert len(output) == len(schema)
      output_dict = dict()
      for name, val in zip(schema, output):
          if name in output_dict:
              output_dict[name].append(val)
          else:
              output_dict[name] = [val]
      return output_dict
  
imports: import inspect
  from typing import Any, Dict, Generator, Iterable, List, Tuple, Union
  from types import ModuleType
  import mxnet
  from mxnet import gluon, nd
  from mxnet.ndarray import NDArray
  import numpy
  from rl_coach.core_types import GradientClippingMethod
label_desc: Use image node_id 10 for calling a global function with example usage: loss_output_dict(output, schema) and returns: output_dict