def write_drawing(worksheet):
 if (worksheet._charts or worksheet._images):
  rel = Relationship(type='drawing', target='')
  worksheet._rels.append(rel)
  drawing = Related()
  drawing.id = ('rId%s' % len(worksheet._rels))
  return drawing.to_tree('drawing')

def write_drawing ( worksheet ) : if ( worksheet . _charts or worksheet . _images ) : rel = Relationship ( type = 'drawing' , target = '' ) worksheet . _rels . append ( rel ) drawing = Related ( ) drawing . id = ( 'rId%s' % len ( worksheet . _rels ) ) return drawing . to_tree ( 'drawing' )
add link to drawing if required .