code: def send_sklearn_warnings_to_logger(
      logger, message, category, filename, lineno, file=None, line=None
  ):
      """
      Return method that sends `sklearn`-specific warnings to a logger.
  
      This method that can be used to replace warnings.showwarning (via `partial`,
      specifying a `logger` instance).
      """
      if SKLEARN_WARNINGS_RE.search(filename):
          logger.warning(
              f"{filename}:{lineno}: {category.__name__}:{message}"
          )
      else:
          orig_showwarning(
              message, category, filename, lineno, file=file, line=line
          )
  
file_path: skll/skll/utils/logging.py
imports: import logging
  import re
  import warnings
  from functools import partial
  from os.path import sep
  from typing import Optional
label_desc: Use image node_id 1 for calling a global function with example usage: send_sklearn_warnings_to_logger(logger, message, category, filename, lineno, file, line) without return types