docstr: self.state_in: tuple of placeholders containing the initial state
  self.state_out: tuple of output state
  
  todo: it appears that the shape of the output is batch, feature
  the code here seems to be slicing off the first element in the batch
  which would definitely be wrong. need to double check the shape
code: def _build_module(self):
      """
      self.state_in: tuple of placeholders containing the initial state
      self.state_out: tuple of output state
  
      todo: it appears that the shape of the output is batch, feature
      the code here seems to be slicing off the first element in the batch
      which would definitely be wrong. need to double check the shape
      """
  
      self.layers.append(self.input)
  
      # optionally insert some layers before the LSTM
      for idx, layer_params in enumerate(self.layers_params):
          self.layers.extend(
              force_list(
                  layer_params(
                      self.layers[-1],
                      name="fc{}".format(idx),
                      is_training=self.is_training,
                  )
              )
          )
  
      # add the LSTM layer
      lstm_cell = tf.nn.rnn_cell.BasicLSTMCell(
          self.number_of_lstm_cells, state_is_tuple=True
      )
      self.c_init = np.zeros((1, lstm_cell.state_size.c), np.float32)
      self.h_init = np.zeros((1, lstm_cell.state_size.h), np.float32)
      self.state_init = [self.c_init, self.h_init]
      self.c_in = tf.placeholder(
          tf.float32, [1, lstm_cell.state_size.c]
      )
      self.h_in = tf.placeholder(
          tf.float32, [1, lstm_cell.state_size.h]
      )
      self.state_in = (self.c_in, self.h_in)
      rnn_in = tf.expand_dims(self.layers[-1], [0])
      step_size = tf.shape(self.layers[-1])[:1]
      state_in = tf.nn.rnn_cell.LSTMStateTuple(self.c_in, self.h_in)
      lstm_outputs, lstm_state = tf.nn.dynamic_rnn(
          lstm_cell,
          rnn_in,
          initial_state=state_in,
          sequence_length=step_size,
          time_major=False,
      )
      lstm_c, lstm_h = lstm_state
      self.state_out = (lstm_c[:1, :], lstm_h[:1, :])
      self.output = tf.reshape(
          lstm_outputs, [-1, self.number_of_lstm_cells]
      )
  
file_path: coach/rl_coach/architectures/tensorflow_components/middlewares/lstm_middleware.py
imports: import numpy
  import tensorflow
  from rl_coach.architectures.tensorflow_components.layers import Dense
  from rl_coach.architectures.tensorflow_components.middlewares.middleware import Middleware
  from rl_coach.base_parameters import MiddlewareScheme
  from rl_coach.core_types import Middleware_LSTM_Embedding
  from rl_coach.utils import force_list
label_desc: Use image node_id 2 for calling the LSTMMiddleware obj's underlying member method code with example usage: obj._build_module() without return types