#NEWLINE# def add_permission( self , file_id , permission ) : #NEWLINE# #INDENT# '\n        Add permission of a certain type to a given file.\n        ' #NEWLINE# try : #NEWLINE# #INDENT# return self . _service . permissions ( ) . insert ( fileId = file_id , body = permission ) . execute ( ) #NEWLINE# #UNINDENT# except errors . HttpError as error : #NEWLINE# #INDENT# logger . exception ( 'An error occured: %s' , error ) #NEWLINE# return None