code: def write(self, fp, options=None, text=None):
          
          output = self.render(options, text)
          if hasattr(output, 'tostring'):
              output.save(fp, format=self.writer.format)
          else:
              fp.write(output)
docs: Renders the barcode and writes it to the file like object
          `fp`.
  
          :parameters:
              fp : File like object
                  Object to write the raw data in.
              options : Dict
                  The same as in `self.render`.
              text : str (unicode on Python 2)
                  Text to render under the barcode.