code: def test_formatter_works(self):
      with init_run(mode="debug", flush_period=0.5) as exp:
          handler = NeptuneHandler(run=exp)
          handler.setFormatter(
              logging.Formatter("%(levelname)s|%(name)s: %(message)s")
          )
          logger = logging.getLogger()
          logger.addHandler(handler)
  
          self._log_messages(logger)
  
          log_entries = list(
              exp["monitoring"]["some_hash"]["python_logger"]
              .fetch_values()
              .value
          )
          self.assertListEqual(
              log_entries,
              [
                  "ERROR|root: error message",
                  "WARNING|root: test message",
              ],
          )
  
file_path: neptune-client/tests/unit/neptune/new/test_log_handler.py
imports: import logging
  import os
  import unittest
  from mock import patch
  from neptune import ANONYMOUS_API_TOKEN, init_run
  from neptune.envs import API_TOKEN_ENV_NAME, PROJECT_ENV_NAME
  from neptune.integrations.python_logger import NeptuneHandler
label_desc: Use image node_id 8 for calling the TestLogHandler obj's underlying member method code with example usage: obj.test_formatter_works() without return types