code: def test_as_type_py():
      assert m.as_type(int) == int
  
      with pytest.raises(TypeError):
          assert m.as_type(1) == int
  
      with pytest.raises(TypeError):
          assert m.as_type(m.DerivedClass1()) == m.DerivedClass1
  
imports: import pytest
  import env
  from pybind11_tests import ConstructorStats, UserType
  from pybind11_tests import class_
label_desc: Use image node_id 9 for calling a global function with example usage: test_as_type_py() without return types