Figure 2 wraps the subtree filter in <get><filter type="subtree">...</filter></get>:
<get>
<filter type="subtree">
<hardware xmlns="urn:ietf:params:xml:ns:yang:ietf-hardware">
<component>
<state/>
</component>
</hardware>
</filter>
</get>
This is a NETCONF RPC (RFC 6241 §7.7), not a YANG-Push subscription. In a YANG-Push context the filter belongs inside within an RPC (RFC 8641 §4.4). The inner XML structure of the filter itself is the same, but presenting it wrapped in in a document about YANG-Push subscriptions is technically incorrect and will mislead implementors. The example should use the correct YANG-Push subscription RPC context.