code: def _make_feature(
      arr: np.ndarray, array_encoder: Optional[ArrayEncoderFn] = None
  ) -> tf.train.Feature:
      """Encodes the array and wraps it into a `tf.train.Feature`."""
      if array_encoder is None:
          array_encoder = encode_array
      # This is important to do to ensure that values not actually
      # wrapped already in a numpy array are encoded and decoded predictably.
      if not isinstance(arr, np.ndarray):
          arr = np.array(arr)
      return tf.train.Feature(
          bytes_list=tf.train.BytesList(value=[encode_array(arr)])
      )
  
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 3 for calling a global function with example usage: _make_feature(arr, array_encoder) and returns: tf