code: def apply_mlp(
      inputs,
      hidden_size,
      output_size,
      output_activation=None,
      hidden_activation="tanh",
      use_time_distributed=False,
  ):
      """Applies simple feed-forward network to an input.
  
      Args:
        inputs: MLP inputs
        hidden_size: Hidden state size
        output_size: Output size of MLP
        output_activation: Activation function to apply on output
        hidden_activation: Activation function to apply on input
        use_time_distributed: Whether to apply across time
  
      Returns:
        Tensor for MLP outputs.
      """
      if use_time_distributed:
          hidden = tf.keras.layers.TimeDistributed(
              tf.keras.layers.Dense(
                  hidden_size, activation=hidden_activation
              )
          )(inputs)
          return tf.keras.layers.TimeDistributed(
              tf.keras.layers.Dense(
                  output_size, activation=output_activation
              )
          )(hidden)
      else:
          hidden = tf.keras.layers.Dense(
              hidden_size, activation=hidden_activation
          )(inputs)
          return tf.keras.layers.Dense(
              output_size, activation=output_activation
          )(hidden)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import gc
  import json
  import os
  import shutil
  import data_formatters.base
  import libs.utils
  import numpy
  import pandas
  import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: apply_mlp(inputs, hidden_size, output_size, output_activation, hidden_activation, use_time_distributed) and returns: tf, tf