code: def test_extract_solution():
      x = symbols("x")
  
      sol = solveset(cos(10 * x))
      assert sol.has(ImageSet)
      res = extract_solution(sol)
      assert len(res) == 20
      assert isinstance(res, FiniteSet)
  
      res = extract_solution(sol, 20)
      assert len(res) == 40
      assert isinstance(res, FiniteSet)
  
file_path: sympy/sympy/plotting/tests/test_utils.py
imports: from pytest import raises
  from sympy import symbols, Expr, Tuple, Integer, cos, solveset, FiniteSet, ImageSet
  from sympy.plotting.utils import _create_ranges, _plot_sympify, extract_solution
  from sympy.physics.mechanics import ReferenceFrame, Vector
  from sympy.vector import CoordSys3D, Vector
label_desc: Use image node_id 3 for calling a global function with example usage: test_extract_solution() without return types