code: def optimizer_before_step_patch():
      global optimizer_before_step_flag
      optimizer_before_step_flag = True
  
file_path: nni/test/algo/compression/utils/test_evaluator.py
imports: from __future__ import annotations
  import pytest
  import torch
  from nni.compression.utils.evaluator import TensorHook, ForwardHook, BackwardHook
  from ..assets.device import device
  from ..assets.simple_mnist import SimpleLightningModel, SimpleTorchModel, create_lighting_evaluator, create_pytorch_evaluator
label_desc: Use image node_id 1 for calling a global function with example usage: optimizer_before_step_patch() without return types