code: def has_legend(self, bool_value):
          
          if bool(bool_value) is False:
              self._remove_legend()
          else:
              if self.legend is None:
                  self._add_legend()
docs: Add, remove, or leave alone the ``<c:legend>`` child element depending
          on current state and *bool_value*. If *bool_value* is |True| and no
          ``<c:legend>`` element is present, a new default element is added.
          When |False|, any existing legend element is removed.