#NEWLINE# @ staticmethod #NEWLINE# def get_impairment( latency = None , delay = None , jitter = None , loss = None , drop = None , corrupt = None , reorder = None , duplicate = None , correlation = None ) : #NEWLINE# #INDENT# "Simplified constructor function for impairment objects. It can't do\n        everything, but makes the common case easier to get.  " #NEWLINE# imp = Impairment ( ) #NEWLINE# if ( latency is not None ) : #NEWLINE# #INDENT# imp . add_delay ( latency , jitter = jitter , correlation = correlation ) #NEWLINE# #UNINDENT# if ( delay is not None ) : #NEWLINE# #INDENT# imp . add_delay ( latency , jitter = jitter , correlation = correlation ) #NEWLINE# #UNINDENT# if ( loss is not None ) : #NEWLINE# #INDENT# imp . add_drop ( loss , correlation = correlation ) #NEWLINE# #UNINDENT# if ( drop is not None ) : #NEWLINE# #INDENT# imp . add_drop ( drop , correlation = correlation ) #NEWLINE# #UNINDENT# if ( corrupt is not None ) : #NEWLINE# #INDENT# imp . add_corrupt ( corrupt , correlation = correlation ) #NEWLINE# #UNINDENT# if ( duplicate is not None ) : #NEWLINE# #INDENT# imp . add_duplicate ( duplicate , correlation = correlation ) #NEWLINE# #UNINDENT# if ( corrupt is not None ) : #NEWLINE# #INDENT# imp . add_reorder ( reorder , correlation = correlation ) #NEWLINE# #UNINDENT# return imp