async function handleNode(nodeDetail) {
  logger.debug(`Matter: Handling node ${nodeDetail.nodeId}`);
  if (!nodeDetail.deviceData) {
    logger.warn(`Matter: Node ${nodeDetail.nodeId} has no device data`);
    return;
  }
  const node = await this.commissioningController.getNode(nodeDetail.nodeId);
  this.nodesMap.set(nodeDetail.nodeId, node);
  const devices = node.getDevices();
  const boundListenToStateChange = this.listenToStateChange.bind(this);
  await Promise.each(devices, async (device) => {
    logger.debug(`Matter: Handling device ${device.number}`);
    await handleDevice(
      nodeDetail.nodeId,
      nodeDetail.deviceData.basicInformation,
      node,
      device,
      this.devices,
      boundListenToStateChange,
      this.serviceId,
      '',
    );
  });
}
@description Handle a Matter node.
@param {object} nodeDetail - The Matter node detail.
@example
await handleNode(nodeDetail);