code: def test_early_stopping_callback_is_picklable(serializer):
      rounds = 5
      callback = lgb.early_stopping(stopping_rounds=rounds)
      callback_from_disk = pickle_and_unpickle_object(
          obj=callback, serializer=serializer
      )
      assert callback_from_disk.order == 30
      assert callback_from_disk.before_iteration is False
      assert (
          callback.stopping_rounds == callback_from_disk.stopping_rounds
      )
      assert callback.stopping_rounds == rounds
  
file_path: LightGBM/tests/python_package_test/test_callback.py
imports: import pytest
  import lightgbm
  from .utils import SERIALIZERS, pickle_and_unpickle_object
label_desc: Use image node_id 2 for calling a global function with example usage: test_early_stopping_callback_is_picklable(serializer) without return types