code: def _ensure_ax(ax):
      if ax is not None:
          return ax
  
      import matplotlib.pyplot as plt
  
      return plt.gca()
  
file_path: pykeen/src/pykeen/pipeline/plot_utils.py
imports: import logging
  from typing import Callable, Mapping, Optional, Set
  from ..losses import loss_resolver
  from ..models.nbase import ERModel
  from ..nn.representation import Representation
  from ..stoppers import EarlyStopper
label_desc: Use image node_id 5 for calling a global function with example usage: _ensure_ax(ax) and returns: plt, ax