code: def test_token_reduction_net() -> None:
      opts = get_opts()
      model = byteformer.ByteFormer(opts)
  
      B, N, C = 1, 256, 192
      x_values = torch.ones([B, N, C])
      mask = torch.ones([B, N])
      mask[0, 129:] = 0
      x_values[:, 129:] = 0
      y, y_mask = model.apply_token_reduction_net(x_values, mask)
      assert y.shape == (1, 31, 192)
      assert y_mask.shape == (1, 31)
      assert (y_mask > 0).float().sum() == 17
  
imports: import argparse
  import torch
  from cvnets.models.classification import byteformer
label_desc: Use image node_id 2 for calling a global function with example usage: test_token_reduction_net() without return types