def METHOD_NAME(self):
    # --error-start
    with broker.Endpoint() as ep1, \
         ep1.make_status_subscriber() as es1:
        r = ep1.peer("127.0.0.1", 1947, 0.0) # Try unavailable port, no retry
        self.assertEqual(r, False) # Not shown in docs.
        st1 = es1.get()
        # s1.code() == broker.EC.PeerUnavailable
        # --error-end
        self.assertEqual(st1.code(), broker.EC.PeerUnavailable)
        # Async version.
        ep1.peer_nosync("127.0.0.1", 1947, 1.0)
        st1 = es1.get()
        self.assertEqual(st1.code(), broker.EC.PeerUnavailable)
        st1 = es1.get()
        self.assertEqual(st1.code(), broker.EC.PeerUnavailable)