code: def _ensure_cpu(
      spans: Ragged, lengths: Ints1d
  ) -> Tuple[Ragged, Ints1d]:
      return Ragged(
          to_numpy(spans.dataXd), to_numpy(spans.lengths)
      ), to_numpy(lengths)
  
file_path: spacy/spacy/ml/extract_spans.py
imports: from typing import Callable, List, Tuple
  from thinc.api import Model, to_numpy
  from thinc.types import Ints1d, Ragged
  from ..util import registry
label_desc: Use image node_id 5 for calling a global function with example usage: _ensure_cpu(spans, lengths) and returns: Ragged,  to_numpy