code: def squad_model(
      bert_config,
      max_seq_length,
      float_type,
      initializer=None,
      hub_module_url=None,
  ):
      """Returns BERT Squad model along with core BERT model to import weights.
  
      Args:
        bert_config: BertConfig, the config defines the core Bert model.
        max_seq_length: integer, the maximum input sequence length.
        float_type: tf.dtype, tf.float32 or tf.bfloat16.
        initializer: Initializer for the final dense layer in the span labeler.
          Defaulted to TruncatedNormal initializer.
        hub_module_url: TF-Hub path/url to Bert module.
  
      Returns:
        A tuple of (1) keras model that outputs start logits and end logits and
        (2) the core BERT transformer encoder.
      """
      if initializer is None:
          initializer = tf.keras.initializers.TruncatedNormal(
              stddev=bert_config.initializer_range
          )
      if not hub_module_url:
          bert_encoder = _get_transformer_encoder(
              bert_config, max_seq_length, float_type
          )
          return (
              bert_span_labeler.BertSpanLabeler(
                  network=bert_encoder, initializer=initializer
              ),
              bert_encoder,
          )
  
      input_word_ids = tf.keras.layers.Input(
          shape=(max_seq_length,), dtype=tf.int32, name="input_word_ids"
      )
      input_mask = tf.keras.layers.Input(
          shape=(max_seq_length,), dtype=tf.int32, name="input_mask"
      )
      input_type_ids = tf.keras.layers.Input(
          shape=(max_seq_length,), dtype=tf.int32, name="input_type_ids"
      )
      core_model = hub.KerasLayer(hub_module_url, trainable=True)
      _, sequence_output = core_model(
          [input_word_ids, input_mask, input_type_ids]
      )
      # Sets the shape manually due to a bug in TF shape inference.
      # TODO(hongkuny): remove this once shape inference is correct.
      sequence_output.set_shape(
          (None, max_seq_length, bert_config.hidden_size)
      )
  
      squad_logits_layer = BertSquadLogitsLayer(
          initializer=initializer,
          float_type=float_type,
          name="squad_logits",
      )
      start_logits, end_logits = squad_logits_layer(sequence_output)
  
      squad = tf.keras.Model(
          inputs={
              "input_word_ids": input_word_ids,
              "input_mask": input_mask,
              "input_type_ids": input_type_ids,
          },
          outputs=[start_logits, end_logits],
          name="squad_model",
      )
      return squad, core_model
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  import tensorflow_hub
  from utils import tf_utils
  from utils.modeling import losses
  from utils.modeling import networks
  from utils.modeling.networks import bert_classifier
  from utils.modeling.networks import bert_pretrainer
  from utils.modeling.networks import bert_span_labeler
label_desc: Use image node_id 4 for calling a global function with example usage: squad_model(bert_config, max_seq_length, float_type, initializer, hub_module_url) and returns: squad,  core_model, bert_span_labeler,  bert_encoder