code: def online_domains(self) -> List[Tuple[NodePeer, NodeMetadataJSON]]:
      def check_domain(
          peer: NodePeer,
      ) -> Optional[Tuple[NodePeer, NodeMetadataJSON]]:
          try:
              guest_client = peer.guest_client
              metadata = guest_client.metadata
              return peer, metadata
          except Exception:  # nosec
              pass
          return None
  
      networks = self.online_networks
  
      self.all_domains = []
      # We can use a with statement to ensure threads are cleaned up promptly
      with futures.ThreadPoolExecutor(max_workers=20) as executor:
          # map
          _all_online_domains = []
          for network in networks:
              network_client = NetworkRegistry.create_client(network)
              domains = network_client.domains
              self.all_domains += domains
              _online_domains = list(
                  executor.map(
                      lambda domain: check_domain(domain), domains
                  )
              )
              _all_online_domains += _online_domains
  
      online_domains = []
      for each in _all_online_domains:
          if each is not None:
              online_domains.append(each)
      return online_domains
  
imports: from __future__ import annotations
  from concurrent import futures
  from typing import Any
  from typing import Dict
  from typing import List
  from typing import Optional
  from typing import TYPE_CHECKING
  from typing import Tuple
  from typing import Union
  import pandas
  import requests
  from ..service.metadata.node_metadata import NodeMetadataJSON
  from ..service.network.network_service import NodePeer
  from ..service.response import SyftException
  from ..types.grid_url import GridURL
  from ..util.constants import DEFAULT_TIMEOUT
  from ..util.logger import error
  from ..util.logger import warning
  from .enclave_client import EnclaveClient
label_desc: Use image node_id 3 for calling the DomainRegistry obj's underlying member method code with example usage: obj.online_domains() and returns: online_domains, None, peer,  metadata