code: def mask_from_end(shape, max_length):
      n_seq, length = shape
      bools = [
          numpy.array(
              [i < max_length for i in range(length)], dtype="bool"
          )
          for _ in range(n_seq)
      ]
      return numpy.concatenate(bools)
  
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 7 for calling a global function with example usage: mask_from_end(shape, max_length) and returns: numpy