docs: def write_resources(self, resources):
          """Write the output data in resources returned by exporter
          to files.
          """
          for filename, data in list(resources.get('outputs', {}).items()):
              # Determine where to write the file to
              dest = os.path.join(self.output_dir, filename)
              path = os.path.dirname(dest)
              if path and not os.path.isdir(path):
                  os.makedirs(path)
  
              # Write file
              with open(dest, 'wb') as f:
                  f.write(data)