#NEWLINE# @ classmethod #NEWLINE# def validate( cls , mapper_spec ) : #NEWLINE# #INDENT# 'Validates mapper specification.\n\n    Args:\n      mapper_spec: an instance of model.MapperSpec to validate.\n    Raises:\n      BadWriterParamsError: when Output writer class mismatch.\n    ' #NEWLINE# if ( mapper_spec . output_writer_class ( ) != cls ) : #NEWLINE# #INDENT# raise errors . BadWriterParamsError ( 'Output writer class mismatch' ) #NEWLINE# #UNINDENT# params = output_writers . _get_params ( mapper_spec ) #NEWLINE# if ( params . BUCKET_NAME_PARAM not in params ) : #NEWLINE# #INDENT# raise errors . BadWriterParamsError ( ( '%s is required for the _HashingGCSOutputWriter' % cls . BUCKET_NAME_PARAM ) )