code: def test_unscoped_enum():
      from pybind11_tests import UnscopedEnum, EOne
  
      assert str(UnscopedEnum.EOne) == "UnscopedEnum.EOne"
      assert str(UnscopedEnum.ETwo) == "UnscopedEnum.ETwo"
      assert str(EOne) == "UnscopedEnum.EOne"
  
      # no TypeError exception for unscoped enum ==/!= int comparisons
      y = UnscopedEnum.ETwo
      assert y == 2
      assert y != 3
  
      assert int(UnscopedEnum.ETwo) == 2
      assert str(UnscopedEnum(2)) == "UnscopedEnum.ETwo"
  
      # order
      assert UnscopedEnum.EOne < UnscopedEnum.ETwo
      assert UnscopedEnum.EOne < 2
      assert UnscopedEnum.ETwo > UnscopedEnum.EOne
      assert UnscopedEnum.ETwo > 1
      assert UnscopedEnum.ETwo <= 2
      assert UnscopedEnum.ETwo >= 2
      assert UnscopedEnum.EOne <= UnscopedEnum.ETwo
      assert UnscopedEnum.EOne <= 2
      assert UnscopedEnum.ETwo >= UnscopedEnum.EOne
      assert UnscopedEnum.ETwo >= 1
      assert not (UnscopedEnum.ETwo < UnscopedEnum.EOne)
      assert not (2 < UnscopedEnum.EOne)
  
imports: import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_unscoped_enum() without return types