code: def process_projection_requirements(figure, *args, **kwargs):
      """
      Handle the args/kwargs to for add_axes/add_subplot/gca,
      returning::
  
          (axes_proj_class, proj_class_kwargs, proj_stack_key)
  
      Which can be used for new axes initialization/identification.
  
      .. note:: **kwargs** is modified in place.
  
      """
      ispolar = kwargs.pop("polar", False)
      projection = kwargs.pop("projection", None)
      if ispolar:
          if projection is not None and projection != "polar":
              raise ValueError(
                  "polar=True, yet projection=%r. "
                  "Only one of these arguments should be supplied."
                  % projection
              )
          projection = "polar"
  
      if isinstance(projection, six.string_types) or projection is None:
          projection_class = get_projection_class(projection)
      elif hasattr(projection, "_as_mpl_axes"):
          projection_class, extra_kwargs = projection._as_mpl_axes()
          kwargs.update(**extra_kwargs)
      else:
          raise TypeError(
              "projection must be a string, None or implement a "
              "_as_mpl_axes method. Got %r" % projection
          )
  
      # Make the key without projection kwargs, this is used as a unique
      # lookup for axes instances
      key = figure._make_key(*args, **kwargs)
  
      return projection_class, kwargs, key
  
file_path: catboost/contrib/python/matplotlib/py2/matplotlib/projections/__init__.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  from .geo import AitoffAxes, HammerAxes, LambertAxes, MollweideAxes
  from .polar import PolarAxes
  from matplotlib import axes
label_desc: Use image node_id 3 for calling a global function with example usage: process_projection_requirements(figure) and returns: projection_class,  kwargs,  key