code: def prepare_whisper_inputs_dict(
      config,
      input_features,
      decoder_input_ids,
      attention_mask=None,
      decoder_attention_mask=None,
      head_mask=None,
      decoder_head_mask=None,
      cross_attn_head_mask=None,
  ):
      if decoder_attention_mask is None:
          decoder_attention_mask = tf.where(
              decoder_input_ids != config.pad_token_id, 1, 0
          )
      if head_mask is None:
          head_mask = tf.ones(
              (config.encoder_layers, config.encoder_attention_heads)
          )
      if decoder_head_mask is None:
          decoder_head_mask = tf.ones(
              (config.decoder_layers, config.decoder_attention_heads)
          )
      if cross_attn_head_mask is None:
          cross_attn_head_mask = tf.ones(
              (config.decoder_layers, config.decoder_attention_heads)
          )
      return {
          "input_features": input_features,
          "decoder_input_ids": decoder_input_ids,
          "decoder_attention_mask": decoder_attention_mask,
          "head_mask": head_mask,
          "decoder_head_mask": decoder_head_mask,
          "cross_attn_head_mask": cross_attn_head_mask,
      }
  
imports: import inspect
  import os
  import tempfile
  import traceback
  import unittest
  import numpy
  from transformers import WhisperConfig, WhisperFeatureExtractor, WhisperProcessor
  from transformers.testing_utils import is_tf_available, require_tf, require_tokenizers, run_test_in_subprocess, slow
  from transformers.utils import cached_property
  from transformers.utils.import_utils import is_datasets_available
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_tf_common import TFModelTesterMixin, floats_tensor, ids_tensor
label_desc: Use image node_id 1 for calling a global function with example usage: prepare_whisper_inputs_dict(config, input_features, decoder_input_ids, attention_mask, decoder_attention_mask, head_mask, decoder_head_mask, cross_attn_head_mask) and returns: dict