code: def test_data_shape():
      # Verify that the series produces the correct data shape when the input
      # expression is a number.
      if not np:
          skip("numpy not installed.")
  
      u, x, y, z = symbols("u, x:z")
  
      # scalar expression: it should return a numpy ones array
      s = LineOver1DRangeSeries(1, (x, -5, 5))
      xx, yy = s.get_data()
      assert len(xx) == len(yy)
      assert np.all(yy == 1)
  
      s = LineOver1DRangeSeries(1, (x, -5, 5), adaptive=False, n=10)
      xx, yy = s.get_data()
      assert len(xx) == len(yy) == 10
      assert np.all(yy == 1)
  
      s = Parametric2DLineSeries(sin(x), 1, (x, 0, pi))
      xx, yy, param = s.get_data()
      assert (len(xx) == len(yy)) and (len(xx) == len(param))
      assert np.all(yy == 1)
  
      s = Parametric2DLineSeries(1, sin(x), (x, 0, pi))
      xx, yy, param = s.get_data()
      assert (len(xx) == len(yy)) and (len(xx) == len(param))
      assert np.all(xx == 1)
  
      s = Parametric2DLineSeries(sin(x), 1, (x, 0, pi), adaptive=False)
      xx, yy, param = s.get_data()
      assert (len(xx) == len(yy)) and (len(xx) == len(param))
      assert np.all(yy == 1)
  
      s = Parametric2DLineSeries(1, sin(x), (x, 0, pi), adaptive=False)
      xx, yy, param = s.get_data()
      assert (len(xx) == len(yy)) and (len(xx) == len(param))
      assert np.all(xx == 1)
  
      s = Parametric3DLineSeries(cos(x), sin(x), 1, (x, 0, 2 * pi))
      xx, yy, zz, param = s.get_data()
      assert (
          (len(xx) == len(yy))
          and (len(xx) == len(zz))
          and (len(xx) == len(param))
      )
      assert np.all(zz == 1)
  
      s = Parametric3DLineSeries(cos(x), 1, x, (x, 0, 2 * pi))
      xx, yy, zz, param = s.get_data()
      assert (
          (len(xx) == len(yy))
          and (len(xx) == len(zz))
          and (len(xx) == len(param))
      )
      assert np.all(yy == 1)
  
      s = Parametric3DLineSeries(1, sin(x), x, (x, 0, 2 * pi))
      xx, yy, zz, param = s.get_data()
      assert (
          (len(xx) == len(yy))
          and (len(xx) == len(zz))
          and (len(xx) == len(param))
      )
      assert np.all(xx == 1)
  
      s = SurfaceOver2DRangeSeries(1, (x, -2, 2), (y, -3, 3))
      xx, yy, zz = s.get_data()
      assert (xx.shape == yy.shape) and (xx.shape == zz.shape)
      assert np.all(zz == 1)
  
      s = ParametricSurfaceSeries(1, x, y, (x, 0, 1), (y, 0, 1))
      xx, yy, zz, uu, vv = s.get_data()
      assert xx.shape == yy.shape == zz.shape == uu.shape == vv.shape
      assert np.all(xx == 1)
  
      s = ParametricSurfaceSeries(1, 1, y, (x, 0, 1), (y, 0, 1))
      xx, yy, zz, uu, vv = s.get_data()
      assert xx.shape == yy.shape == zz.shape == uu.shape == vv.shape
      assert np.all(yy == 1)
  
      s = ParametricSurfaceSeries(x, 1, 1, (x, 0, 1), (y, 0, 1))
      xx, yy, zz, uu, vv = s.get_data()
      assert xx.shape == yy.shape == zz.shape == uu.shape == vv.shape
      assert np.all(zz == 1)
  
imports: from sympy import latex, exp, symbols, I, pi, sin, cos, tan, log, sqrt, re, im, arg, frac, Sum, S, Abs, lambdify, Function, dsolve, Eq, floor, Tuple
  from sympy.external import import_module
  from sympy.plotting.series import LineOver1DRangeSeries, Parametric2DLineSeries, Parametric3DLineSeries, SurfaceOver2DRangeSeries, ContourSeries, ParametricSurfaceSeries, ImplicitSeries, _set_discretization_points, List2DSeries
  from sympy.testing.pytest import raises, warns, XFAIL, skip, ignore_warnings
label_desc: Use image node_id 8 for calling a global function with example usage: test_data_shape() without return types