def METHOD_NAME(caplog):
    class T(m.Product):
        x = m.Out(m.Bit)
        y = m.In(m.Bit)
    class Foo(m.Circuit):
        io = m.IO(z=T, I=m.In(m.Bit))
    class Bar(m.Circuit):
        io = m.IO(z=T, I=m.In(m.Bit), O=m.Out(m.Bit))
        foo = Foo()
        foo.I @= io.I
        io.O @= foo.z.x
    assert caplog.messages[0] == "Bar.z.x not driven"
    assert caplog.messages[1] == "Bar.z.x: Unconnected"
    assert has_error(caplog, """\