code: def _plot3d_plot_contour_helper(Series, *args, **kwargs):
      """plot3d and plot_contour are structurally identical. Let's reduce
      code repetition.
      """
      # NOTE: if this import would be at the top-module level, it would trigger
      # SymPy's optional-dependencies tests to fail.
      from sympy.vector import BaseScalar
  
      args = _plot_sympify(args)
      plot_expr = _check_arguments(args, 1, 2, **kwargs)
  
      free_x = set()
      free_y = set()
      _types = (Symbol, BaseScalar, Indexed, AppliedUndef)
      for p in plot_expr:
          free_x |= (
              {p[1][0]}
              if isinstance(p[1][0], _types)
              else {Symbol(p[1][0])}
          )
          free_y |= (
              {p[2][0]}
              if isinstance(p[2][0], _types)
              else {Symbol(p[2][0])}
          )
      x = free_x.pop() if free_x else Symbol("x")
      y = free_y.pop() if free_y else Symbol("y")
      kwargs.setdefault("xlabel", x)
      kwargs.setdefault("ylabel", y)
      kwargs.setdefault("zlabel", Function("f")(x, y))
  
      # if a polar discretization is requested and automatic labelling has ben
      # applied, hide the labels on the x-y axis.
      if kwargs.get("is_polar", False):
          if callable(kwargs["xlabel"]):
              kwargs["xlabel"] = ""
          if callable(kwargs["ylabel"]):
              kwargs["ylabel"] = ""
  
      labels = kwargs.pop("label", [])
      rendering_kw = kwargs.pop("rendering_kw", None)
      series = _create_series(Series, plot_expr, **kwargs)
      _set_labels(series, labels, rendering_kw)
      plots = plot_factory(*series, **kwargs)
      if kwargs.get("show", True):
          plots.show()
      return plots
  
imports: from sympy.concrete.summations import Sum
  from sympy.core.containers import Tuple
  from sympy.core.expr import Expr
  from sympy.core.function import Function, AppliedUndef
  from sympy.core.symbol import Dummy, Symbol, Wild
  from sympy.external import import_module
  from sympy.functions import sign
  from sympy.plotting.backends.base_backend import Plot
  from sympy.plotting.backends.matplotlibbackend import MatplotlibBackend
  from sympy.plotting.backends.textbackend import TextBackend
  from sympy.plotting.series import LineOver1DRangeSeries, Parametric2DLineSeries, Parametric3DLineSeries, ParametricSurfaceSeries, SurfaceOver2DRangeSeries, ContourSeries
  from sympy.plotting.utils import _check_arguments, _plot_sympify
  from sympy.tensor.indexed import Indexed
  from sympy.plotting.plotgrid import PlotGrid
  from sympy.plotting.series import BaseSeries
  from sympy.plotting.series import Line2DBaseSeries
  from sympy.plotting.series import Line3DBaseSeries
  from sympy.plotting.series import SurfaceBaseSeries
  from sympy.plotting.series import List2DSeries
  from sympy.plotting.series import GenericDataSeries
  from sympy.plotting.series import centers_of_faces
  from sympy.plotting.series import centers_of_segments
  from sympy.plotting.series import flat
  from sympy.plotting.backends.base_backend import unset_show
  from sympy.plotting.backends.matplotlibbackend import _matplotlib_list
  from sympy.plotting.textplot import textplot
label_desc: Use image node_id 9 for calling a global function with example usage: _plot3d_plot_contour_helper(Series) and returns: plots