code: def retrieve_nodes(self) -> List[NodePeer]:
      if self.node_type in [NodeType.DOMAIN, NodeType.ENCLAVE]:
          return self.routing_client.api.services.network.get_peers_by_type(
              node_type=self.node_type
          )
      elif self.node_type is None:
          # if node type is None, return all nodes
          return (
              self.routing_client.api.services.network.get_all_peers()
          )
      else:
          raise SyftException(
              f"Unknown node type {self.node_type} to retrieve proxy client"
          )
  
imports: from typing import Any
  from typing import List
  from typing import Optional
  from typing import Union
  from typing_extensions import Self
  from ..abstract_node import NodeSideType
  from ..abstract_node import NodeType
  from ..img.base64 import base64read
  from ..node.credentials import SyftSigningKey
  from ..serde.serializable import serializable
  from ..service.network.node_peer import NodePeer
  from ..service.response import SyftError
  from ..service.response import SyftException
  from ..types.syft_object import SYFT_OBJECT_VERSION_1
  from ..types.syft_object import SyftObject
  from ..util.fonts import fonts_css
  from .client import SyftClient
label_desc: Use image node_id 1 for calling the ProxyClient obj's underlying member method code with example usage: obj.retrieve_nodes() and returns: self, self