code: def eigvals(x: torch.Tensor, /) -> torch.Tensor:
      if not torch.is_complex(x):
          x = x.to(torch.complex128)
      return torch.linalg.eigvals(x)
  
file_path: ivy/ivy/functional/backends/torch/experimental/linear_algebra.py
imports: import math
  import torch
  from typing import Optional, Tuple, Sequence, Union
  import ivy
  from ivy.func_wrapper import with_unsupported_dtypes
  from ivy.utils.exceptions import IvyNotImplementedException
  from ..None import backend_version
  from ivy.functional.ivy.experimental.linear_algebra import _check_valid_dimension_size
label_desc: Use image node_id 5 for calling a global function with example usage: eigvals() and returns: torch