code: def _test_logger(name, log_file, max_bytes, backup_count):
      handler = logging.handlers.RotatingFileHandler(
          log_file, maxBytes=max_bytes, backupCount=backup_count
      )
      formatter = logging.Formatter("%(message)s")
      handler.setFormatter(formatter)
  
      logger = logging.getLogger(name)
      logger.propagate = False
      logger.setLevel(logging.INFO)
      logger.addHandler(handler)
  
      return logger
  
imports: import os
  import sys
  import time
  import json
  import copy
  import logging
  import requests
  import asyncio
  import random
  import tempfile
  import socket
  from pprint import pprint
  from datetime import datetime
  import pytest
  import numpy
  import ray
  from ray.util.state import list_cluster_events
  from ray._private.utils import binary_to_hex
  from ray.cluster_utils import AutoscalingCluster
  from ray._private.event.event_logger import filter_event_by_level, get_event_logger
  from ray.dashboard.tests.conftest import *
  from ray.dashboard.modules.event import event_consts
  from ray.core.generated import event_pb2
  from ray._private.test_utils import format_web_url, wait_until_server_available, wait_for_condition
  from ray.dashboard.modules.event.event_utils import monitor_events
  from ray.job_submission import JobSubmissionClient
label_desc: Use image node_id 2 for calling a global function with example usage: _test_logger(name, log_file, max_bytes, backup_count) and returns: logger