code: def isGraphFullyConnected(
      affinity_mat: torch.Tensor, device: torch.device
  ) -> torch.Tensor:
      """
      Check whether the given affinity matrix is a fully connected graph.
      """
      return (
          getTheLargestComponent(affinity_mat, 0, device).sum()
          == affinity_mat.shape[0]
      )
  
imports: from typing import Dict, List, Tuple
  import torch
  from torch.linalg import eigh, eigvalsh
label_desc: Use image node_id 7 for calling a global function with example usage: isGraphFullyConnected(affinity_mat, device) and returns: unknown