code: def align(sequences):
      lengths = []
      indices = []
      offset = 0
      for seq in sequences:
          for token_length in seq:
              lengths.append(token_length)
              indices.extend(i + offset for i in range(token_length))
              offset += token_length
      return Ragged(
          numpy.array(indices, dtype="i"),
          numpy.array(lengths, dtype="i"),
      )
  
file_path: spacy-transformers/spacy_transformers/tests/test_truncation.py
imports: import pytest
  import numpy
  from thinc.types import Ragged
  from thinc.api import NumpyOps
  from ..data_classes import WordpieceBatch
  from ..truncate import _truncate_tokens, _truncate_alignment
label_desc: Use image node_id 5 for calling a global function with example usage: align(sequences) and returns: Ragged