code: def check_eigenvector(A, l, x):
      nx = np.linalg.norm(x)
      # Check zeroness.
      assert nx != pytest.approx(0, abs=1e-07)
      y = A @ x
      ny = np.linalg.norm(y)
      # Check collinearity.
      assert x @ y == pytest.approx(nx * ny, abs=1e-7)
      # Check eigenvalue.
      assert ny == pytest.approx(l * nx, abs=1e-7)
  
imports: from math import sqrt
  import pytest
  import networkx
label_desc: Use image node_id 6 for calling a global function with example usage: check_eigenvector(A, l, x) without return types