code: def prepare_bloom_inputs_dict(config, input_ids, attention_mask=None):
      if attention_mask is None:
          attention_mask = np.where(
              input_ids != config.pad_token_id, 1, 0
          )
      return {"input_ids": input_ids, "attention_mask": attention_mask}
  
imports: import unittest
  import numpy
  from transformers import BloomConfig, BloomTokenizerFast, is_flax_available
  from transformers.testing_utils import require_flax, slow
  from ...generation.test_flax_utils import FlaxGenerationTesterMixin
  from ...test_modeling_flax_common import FlaxModelTesterMixin, ids_tensor
label_desc: Use image node_id 1 for calling a global function with example usage: prepare_bloom_inputs_dict(config, input_ids, attention_mask) and returns: dict