code: def _get_array(model, X: SeqT) -> ArrayXd:
      if isinstance(X, Ragged):
          return X.dataXd
      elif isinstance(X, Padded):
          return X.data
      elif not isinstance(X, (list, tuple)):
          return cast(ArrayXd, X)
      else:
          return model.ops.flatten(X)
  
file_path: thinc/thinc/layers/with_array.py
imports: from typing import Callable, Optional, Tuple, TypeVar, Union, cast
  from ..backends import NumpyOps
  from ..config import registry
  from ..model import Model
  from ..types import Array3d, ArrayXd, ListXd, Padded, Ragged
label_desc: Use image node_id 4 for calling a global function with example usage: _get_array(model, X) and returns: X, X, cast, model