code: def test_compute_mask_indices(self):
      batch_size = 4
      sequence_length = 60
      mask_prob = 0.5
      mask_length = 1
  
      mask = _compute_mask_indices(
          (batch_size, sequence_length), mask_prob, mask_length
      )
      mask = torch.from_numpy(mask).to(torch_device)
  
      self.assertListEqual(
          mask.sum(axis=-1).tolist(),
          [mask_prob * sequence_length for _ in range(batch_size)],
      )
  
imports: import math
  import unittest
  import numpy
  from datasets import load_dataset
  from tests.test_modeling_common import floats_tensor, ids_tensor, random_attention_mask
  from transformers import Data2VecAudioConfig, is_torch_available
  from transformers.testing_utils import is_pt_flax_cross_test, require_soundfile, require_torch, slow, torch_device
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, _config_zero_init
  from ...test_pipeline_mixin import PipelineTesterMixin
label_desc: Use image node_id 1 for calling the Data2VecAudioUtilsTest obj's underlying member method code with example usage: obj.test_compute_mask_indices() without return types