code: def draw_legend(self, legend, props):
      self._current_legend = legend
      self._legend_props = props
      self.open_legend(legend=legend, props=props)
      yield
      self.close_legend(legend=legend)
      self._current_legend = None
      self._legend_props = {}
  
imports: import warnings
  import itertools
  from contextlib import contextmanager
  from packaging.version import Version
  import numpy
  import matplotlib
  from matplotlib import transforms
  from ..None import utils
label_desc: Use image node_id 9 for calling the Renderer obj's underlying member method code with example usage: obj.draw_legend(legend, props) without return types