code: def _prepare_decoder_attention_mask(
      self,
      attention_mask: tf.Tensor | None,
      input_shape: tf.TensorShape,
      past_key_values_length: int,
  ) -> tf.Tensor:
      # create causal mask
      # [bsz, seq_len] -> [bsz, 1, tgt_seq_len, src_seq_len]
      combined_attention_mask = _make_causal_mask(
          input_shape, past_key_values_length
      )
      combined_attention_mask = tf.cond(
          input_shape[-1] > 1,
          lambda: combined_attention_mask,
          lambda: tf.ones_like(combined_attention_mask),
      )
      if attention_mask is None:
          return combined_attention_mask
      expand_attention_mask = _expand_mask(
          attention_mask, tgt_len=input_shape[-1]
      )
      return expand_attention_mask + combined_attention_mask
  
imports: from __future__ import annotations
  import math
  import random
  from typing import Any, Optional, Tuple, Union
  import numpy
  import tensorflow
  from ...activations_tf import get_tf_activation
  from ...file_utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward, replace_return_docstrings
  from ...modeling_tf_outputs import TFBaseModelOutputWithPastAndCrossAttentions, TFCausalLMOutputWithCrossAttentions
  from ...modeling_tf_utils import TFCausalLanguageModelingLoss, TFModelInputType, TFPreTrainedModel, TFSharedEmbeddings, get_initializer, keras_serializable, unpack_inputs
  from ...tf_utils import check_embeddings_within_bounds, shape_list, stable_softmax
  from ...utils import logging
  from .configuration_xglm import XGLMConfig
label_desc: Use image node_id 4 for calling the TFXGLMMainLayer obj's underlying member method code with example usage: obj._prepare_decoder_attention_mask(attention_mask, input_shape, past_key_values_length) and returns: unknown, combined_attention_mask