code: def make_batches(
      n_samples_per_batch: int,
      n_features: int,
      n_batches: int,
      tmpdir: str,
  ) -> List[Tuple[str, str]]:
      files: List[Tuple[str, str]] = []
      rng = np.random.RandomState(1994)
      for i in range(n_batches):
          X, y = make_regression(
              n_samples_per_batch, n_features, random_state=rng
          )
          X_path = os.path.join(tmpdir, "X-" + str(i) + ".npy")
          y_path = os.path.join(tmpdir, "y-" + str(i) + ".npy")
          np.save(X_path, X)
          np.save(y_path, y)
          files.append((X_path, y_path))
      return files
  
file_path: xgboost/demo/guide-python/external_memory.py
imports: import os
  import tempfile
  from typing import Callable, List, Tuple
  import numpy
  from sklearn.datasets import make_regression
  import xgboost
label_desc: Use image node_id 1 for calling a global function with example usage: make_batches(n_samples_per_batch, n_features, n_batches, tmpdir) and returns: files