code: def _make_example(
      d: Dict[str, np.ndarray],
      array_encoder: Optional[ArrayEncoderFn] = None,
  ) -> bytes:
      """Serializes a dictionary of arrays using an `tf.train.Example` proto."""
      features_dict = {
          key: _make_feature(value, array_encoder)
          for key, value in d.items()
      }
      return tf.train.Example(
          features=tf.train.Features(feature=features_dict)
      ).SerializeToString()
  
file_path: tf-quant-finance/tf_quant_finance/experimental/io.py
imports: from typing import Dict, Callable, Optional
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 4 for calling a global function with example usage: _make_example(d, array_encoder) and returns: tf