code: def build_sequence_embedding(
      self,
      encoder,
      embedding,
      inputs,
      embed_name,
      suffix="",
      layer=None,
      reshape=None,
  ):
      sequence_embed_size = (
          encoder.embed_scale * self.sequence_embed_size
      )
      sequence = []
      for i in range(encoder.sequence_length):
          if reshape:
              sequence.append(
                  reshape(
                      embedding(
                          inputs[encoder.sequence_name(i, suffix)]
                      )
                  )
              )
          else:
              sequence.append(
                  embedding(inputs[encoder.sequence_name(i, suffix)])
              )
  
      if self.short_names:
          embed_sequence_name = embed_name + "s" + suffix
          embed_rnn_name = embed_name + "r" + suffix
      else:
          embed_sequence_name = embed_name + "_sequence" + suffix
          embed_rnn_name = (
              embed_name + "_" + self.sequence_embedding + suffix
          )
  
      embed_sequence = Concatenate(name=embed_sequence_name)(sequence)
  
      if self.sequence_embedding == "flatten" and not layer:
          layer = Flatten
      elif (
          self.sequence_embedding in ["lstm", "gru", "simple_rnn"]
          and not layer
      ):
          if self.sequence_embedding == "lstm":
              layer = LSTM
              if self.cudnn:
                  if available_gpus > 0:
                      layer = CuDNNLSTM
                  else:
                      raise ValueError(
                          "Your estimator self.cuddn is True, but there are no GPUs available to tensorflow"
                      )
          elif self.sequence_embedding == "gru":
              layer = GRU
              if self.cudnn:
                  if available_gpus > 0:
                      layer = CuDNNGRU
                  else:
                      raise ValueError(
                          "Your estimator self.cuddn is True, but there are no GPUs available to tensorflow"
                      )
          elif self.sequence_embedding == "simple_rnn":
              layer = SimpleRNN
          else:
              raise ValueError(
                  "Unknown sequence_embedding type: %s"
                  % self.sequence_embedding
              )
  
      if self.sequence_embedding in ["lstm", "gru", "simple_rnn"]:
          embedding = layer(sequence_embed_size, name=embed_rnn_name)(
              embed_sequence
          )
      else:
          embedding = layer(name=embed_rnn_name)(embed_sequence)
      return embedding, layer
  
imports: from __future__ import absolute_import
  import atexit
  import logging
  import lore.io
  import lore.estimators
  from lore.callbacks import ReloadBest
  from lore.encoders import Continuous, Pass
  from lore.pipelines import Observations
  from lore.util import timed, before_after_callbacks
  from lore.env import require
  import keras
  import keras.backend
  from keras.callbacks import EarlyStopping, TensorBoard, TerminateOnNaN
  from keras.layers import Input, Embedding, Dense, Reshape, Concatenate, Dropout, SimpleRNN, Flatten, LSTM, GRU, BatchNormalization
  from keras.optimizers import Adam
  import numpy
  import pandas
  import tensorflow
  from tensorflow.python.client.timeline import Timeline
  from tensorflow.python.client import device_lib
label_desc: Use image node_id 9 for calling the Base obj's underlying member method code with example usage: obj.build_sequence_embedding(encoder, embedding, inputs, embed_name, suffix, layer, reshape) and returns: embedding,  layer