code: def warn_logging(logger):
      # type: (logging.Logger) -> Callable
      
      def showwarning(message, category, filename, lineno, file=None, line=None):
          logger.warning(message)
      return showwarning
docs: Create a `showwarning` function that uses the given logger.
  
      Arguments:
          logger (~logging.Logger): the logger to use.
  
      Returns:
          function: a function that can be used as the `warnings.showwarning`
              callback.