code: def get_random_data(
      max_B=8,
      max_T=128,
      max_U=32,
      max_D=40,
      blank=-1,
      fused_log_softmax=True,
      dtype=torch.float32,
      device=CPU_DEVICE,
      seed=None,
  ):
      if seed is not None:
          torch.manual_seed(seed=seed)
  
      if blank != -1:
          raise ValueError("blank != -1 is not supported yet.")
  
      random.seed(0)
      B = random.randint(1, max_B - 1)
      T = random.randint(5, max_T - 1)
      U = random.randint(5, max_U - 1)
      D = random.randint(2, max_D - 1)
  
      logit_lengths = torch.randint(
          low=5, high=T + 1, size=(B,), dtype=torch.int32, device=device
      )
      target_lengths = torch.randint(
          low=5, high=U + 1, size=(B,), dtype=torch.int32, device=device
      )
      max_src_length = torch.max(logit_lengths)
      max_tgt_length = torch.max(target_lengths)
  
      targets = torch.randint(
          low=0,
          high=D - 1,
          size=(B, max_tgt_length),
          dtype=torch.int32,
          device=device,
      )
      logits = torch.rand(
          size=(B, max_src_length, max_tgt_length + 1, D),
          dtype=dtype,
          device=device,
      ).requires_grad_(True)
  
      def grad_hook(grad):
          logits.saved_grad = grad.clone()
  
      logits.register_hook(grad_hook)
  
      return {
          "logits": logits,
          "targets": targets,
          "logit_lengths": logit_lengths,
          "target_lengths": target_lengths,
          "blank": blank,
          "fused_log_softmax": fused_log_softmax,
      }
  
imports: import random
  import unittest
  import numpy
  import torch
  from torchaudio.functional import rnnt_loss
label_desc: Use image node_id 7 for calling a global function with example usage: get_random_data(max_B, max_T, max_U, max_D, blank, fused_log_softmax, dtype, device, seed) and returns: dict