def METHOD_NAME():
    class FakeFile:
        def close(self):  # pragma: no cover
            pass
        def write(self):  # pragma: no cover
            pass
    wrapped = FakeFile()
    assert not isinstance(wrapped, io.IOBase)
    async_file = trio.wrap_file(wrapped)
    assert isinstance(async_file, AsyncIOWrapper)
    del FakeFile.write
    with pytest.raises(TypeError):
        trio.wrap_file(FakeFile())