#NEWLINE# def clean_fixture_field_name( field_name ) : #NEWLINE# #INDENT# "Effectively slugifies a fixture's field name so that we don't send\n    bad XML back from the phone. Ideally, the fixture name should be\n    verified as a good slug before using it.\n    " #NEWLINE# subbed_string = re . sub ( BAD_SLUG_PATTERN , '_' , subbed_string ) #NEWLINE# if subbed_string . startswith ( 'xml' ) : #NEWLINE# #INDENT# subbed_string = subbed_string . replace ( 'xml' , '_' , 1 ) #NEWLINE# #UNINDENT# return subbed_string