code: def raise_if_failed(response: p2pd_pb.Response) -> None:
      if response.type == p2pd_pb.Response.ERROR:
          raise ControlFailure(
              f"Connect failed. msg={response.error.msg}"
          )
  
file_path: hivemind/hivemind/p2p/p2p_daemon_bindings/utils.py
imports: import asyncio
  from google.protobuf.message import Message
  from hivemind.proto import p2pd_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: raise_if_failed(response) without return types