code: def build_and_compile_bert_classifier(
      bert_layer: tf.keras.layers.Layer,
      max_len: int,
      num_classes: int,
      learning_rate: float = 5e-5,
      metrics: Optional[
          List[Union[str, tf.keras.metrics.Metric]]
      ] = None,
  ):
      """Build and compile keras BERT classification model.
  
      Apart from the necessary inputs, use default/suggested parameters in build
      and compile BERT classifier functions.
  
      Args:
        bert_layer: A tensorflow_hub.KerasLayer intence of BERT layer.
        max_len: The maximum length of preprocessed tokens.
        num_classes: Number of unique classes in the labels. Determines the output
          shape of the classification layer.
        learning_rate: Suggested learning rate to be used in
          tf.keras.optimizer.Adam. The three suggested learning_rates for
          fine-tuning are [2e-5, 3e-5,5e-5]
        metrics: Default None will use ['sparse_categorical_accuracy']. An array of
          strings or tf.keras.metrics.
  
      Returns:
          A compiled keras BERT Classification model.
      """
      if metrics is None:
          metrics = ["sparse_categorical_accuracy"]
  
      model = build_bert_classifier(bert_layer, max_len, num_classes)
  
      compile_bert_classifier(
          model, learning_rate=learning_rate, metrics=metrics
      )
      return model
  
imports: from typing import Optional, List, Union
  import tensorflow
  import tensorflow.keras
label_desc: Use image node_id 3 for calling a global function with example usage: build_and_compile_bert_classifier(bert_layer, max_len, num_classes, learning_rate, metrics) and returns: model