#NEWLINE# @ classmethod #NEWLINE# def _get_sample_path( cls , name , dirname , suffix = '' , api_version = None ) : #NEWLINE# #INDENT# parts = [ dirname ] #NEWLINE# parts . append ( 'api_samples' ) #NEWLINE# if ( cls . all_extensions and ( not cls . sample_dir ) ) : #NEWLINE# #INDENT# parts . append ( 'all_extensions' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if cls . _use_common_server_api_samples : #NEWLINE# #INDENT# parts . append ( 'servers' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if cls . sample_dir : #NEWLINE# #INDENT# parts . append ( cls . sample_dir ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if api_version . extension_name : #NEWLINE# #INDENT# parts . append ( cls . extension_name ) #NEWLINE# #UNINDENT# #UNINDENT# if api_version : #NEWLINE# #INDENT# parts . append ( ( 'v' + api_version ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# parts . append ( ( ( name + '.json' ) + suffix ) ) #NEWLINE# return os . path . join ( * parts )