code: def _validate(cls, options, items, warnfn):
          "Validation of edge cases and incompatible options"
  
          if 'html' in Store.display_formats:
              pass
          elif 'fig' in items and items['fig'] not in Store.display_formats:
              msg = ("Requesting output figure format %r " % items['fig']
                     + "not in display formats %r" % Store.display_formats)
              if warnfn is None:
                  print('Warning: {msg}'.format(msg=msg))
              else:
                  warnfn(msg)
  
          backend = Store.current_backend
          return Store.renderers[backend].validate(optionsf _validate(cls, options, items, warnfn):
          "Validation of edge cases and incompatible options"
  
          if 'html' in Store.display_formats:
              pass
          elif 'fig' in items and items['fig'] not in Store.display_formats:
              msg = ("Requesting output figure format %r " % items['fig']
                     + "not in display formats %r" % Store.display_formats)
              if warnfn is None:
                  print('Warning: {msg}'.format(msg=msg))
              else:
                  warnfn(msg)
  
          backend = Store.current_backend
          return Store.renderers[backend].validate(options)
docs: Validation of edge cases and incompatible options