code: def _eig_helper(H: Tensor):
      """
      wrapper around `torch.linalg.eig` that sorts eigenvalues / eigenvectors by
      ascending eigenvalues, like `torch.linalg.eigh`, and returns the real component
      (since `H` is never complex, there should never be a complex component. however,
      `torch.linalg.eig` always returns a complex tensor, which in this case would
      actually have no complex component)
      """
      version = _parse_version(torch.__version__)
      if version < (1, 9):
          ls, vs = torch.eig(H, eigenvectors=True)
          ls = ls[:, 0]
      else:
          ls, vs = torch.linalg.eig(H)
          ls, vs = ls.real, vs.real
  
      ls_argsort = torch.argsort(ls)
      vs = vs[:, ls_argsort]
      ls = ls[ls_argsort]
      return ls, vs
  
imports: import warnings
  from functools import reduce
  from typing import Any, Callable, Iterable, List, NamedTuple, Optional, Tuple, TYPE_CHECKING, Union
  import torch
  import torch.nn
  from captum._utils.common import _get_module_from_name, _parse_version
  from captum._utils.gradient import _compute_jacobian_wrt_params, _compute_jacobian_wrt_params_with_sample_wise_trick
  from captum._utils.progress import progress
  from torch import Tensor
  from torch.nn import Module
  from torch.utils.data import DataLoader, Dataset
label_desc: Use image node_id 17 for calling a global function with example usage: _eig_helper(H) and returns: ls,  vs