code: def get_attachment(self, id, filename, file):
          
          data = self.get_attachment_data(id, filename)
          file.write(data)
          return len(data)
docs: Retrieve the contents of a specific attachment (identified by filename).
  
          Writes data to file object, returns length of data written.