code: def check_subword_timestamps(
      hyp: Hypothesis, decoding: CTCBPEDecoding
  ):
      assert hyp.timestep is not None
      assert isinstance(hyp.timestep, dict)
      assert "timestep" in hyp.timestep
      assert "char" in hyp.timestep
      assert "word" in hyp.timestep
  
      chars = list(hyp.text)
      chars = list(filter(lambda x: x not in ["", " ", "#"], chars))
      all_chars = [
          list(decoding.tokenizer.tokens_to_text(data["char"]))
          for data in hyp.timestep["char"]
      ]
      all_chars = [char for subword in all_chars for char in subword]
      all_chars = list(
          filter(lambda x: x not in ["", " ", "#"], all_chars)
      )
      assert len(chars) == len(all_chars)
  
file_path: NeMo/tests/collections/asr/decoding/test_ctc_decoding.py
imports: import os
  from functools import lru_cache
  import pytest
  import torch
  from omegaconf import DictConfig, OmegaConf
  from nemo.collections.asr.parts.mixins import mixins
  from nemo.collections.asr.parts.submodules.ctc_decoding import CTCBPEDecoding, CTCBPEDecodingConfig, CTCDecoding, CTCDecodingConfig
  from nemo.collections.asr.parts.utils.rnnt_utils import Hypothesis
label_desc: Use image node_id 4 for calling a global function with example usage: check_subword_timestamps(hyp, decoding) without return types