code: def profile(
      model: str, inputs: Optional[Path] = None, n_texts: int = 10000
  ) -> None:
      if inputs is not None:
          texts = _read_inputs(inputs, msg)
          texts = list(itertools.islice(texts, n_texts))
      if inputs is None:
          try:
              import ml_datasets
          except ImportError:
              msg.fail(
                  "This command, when run without an input file, "
                  "requires the ml_datasets library to be installed: "
                  "pip install ml_datasets",
                  exits=1,
              )
  
          with msg.loading("Loading IMDB dataset via ml_datasets..."):
              imdb_train, _ = ml_datasets.imdb(
                  train_limit=n_texts, dev_limit=0
              )
              texts, _ = zip(*imdb_train)
          msg.info(f"Loaded IMDB dataset and using {n_texts} examples")
      with msg.loading(f"Loading pipeline '{model}'..."):
          nlp = load_model(model)
      msg.good(f"Loaded pipeline '{model}'")
      cProfile.runctx(
          "parse_texts(nlp, texts)", globals(), locals(), "Profile.prof"
      )
      s = pstats.Stats("Profile.prof")
      msg.divider("Profile stats")
      s.strip_dirs().sort_stats("time").print_stats()
  
file_path: spacy/spacy/cli/profile.py
imports: import cProfile
  import itertools
  import pstats
  import sys
  from pathlib import Path
  from typing import Iterator, Optional, Sequence, Union
  import srsly
  import tqdm
  import typer
  from wasabi import Printer, msg
  from ..language import Language
  from ..util import load_model
  from ._util import NAME, Arg, Opt, app, debug_cli
label_desc: Use image node_id 2 for calling a global function with example usage: profile(model, inputs, n_texts) without return types