code: def acoustic_model(inputs, hparams, lstm_units, lengths, is_training):
      """Acoustic model that handles all specs for a sequence in one window."""
      conv_output = conv_net(inputs, hparams)
      if not lstm_units:
          return conv_output
  
      # default to lstm_layer
      if hparams.use_tflite_compatible:
          lstm_layer_builder = lstm_layer_static_for_tflite
      else:
          lstm_layer_builder = lstm_layer
  
      return lstm_layer_builder(
          conv_output,
          lstm_units,
          hparams.bidirectional,
          is_training=is_training,
          lengths=lengths if hparams.use_lengths else None,
          stack_size=hparams.acoustic_rnn_stack_size,
          dropout_keep_prob=hparams.acoustic_rnn_dropout_keep_prob,
      )
  
file_path: magenta/magenta/models/onsets_frames_transcription/model_tpu.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from magenta.contrib import rnn
  from magenta.contrib import training
  from magenta.models.onsets_frames_transcription import constants
  from magenta.models.onsets_frames_transcription import estimator_spec_util
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
  import tf_slim
label_desc: Use image node_id 4 for calling a global function with example usage: acoustic_model(inputs, hparams, lstm_units, lengths, is_training) and returns: lstm_layer_builder, conv_output