code: def legacy_printoptions():
      from packaging.version import Version
  
      if Version(np.__version__) >= Version("1.22"):
          np.set_printoptions(legacy="1.21")
  
imports: import sys
  import numpy
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: legacy_printoptions() without return types