code: def locate_local_libxgboost(
      toplevel_dir: pathlib.Path,
      logger: logging.Logger,
  ) -> Optional[pathlib.Path]:
      """
      Locate libxgboost from the local project directory's lib/ subdirectory.
      """
      libxgboost = toplevel_dir.parent / "lib" / _lib_name()
      if libxgboost.exists():
          logger.info(
              "Found %s at %s", libxgboost.name, str(libxgboost.parent)
          )
          return libxgboost
      return None
  
file_path: xgboost/python-package/packager/nativelib.py
imports: import logging
  import os
  import pathlib
  import shutil
  import subprocess
  import sys
  from platform import system
  from typing import Optional
  from .build_config import BuildConfiguration
label_desc: Use image node_id 3 for calling a global function with example usage: locate_local_libxgboost(toplevel_dir, logger) and returns: None, libxgboost