<s> """<STR_LIT>""" <EOL> from __future__ import division , print_function , absolute_import <EOL> from . . py3k import asstr <EOL> def find_private_section ( dcm_data , group_no , creator ) : <EOL> """<STR_LIT>""" <EOL> is_regex = hasattr ( creator , '<STR_LIT>' ) <EOL> if not is_regex : <EOL> creator = asstr ( creator ) <EOL> for element in dcm_data : <EOL> grpno , elno = element . tag . group , element . tag . elem <EOL> if grpno > group_no : <EOL> break <EOL> if grpno != group_no : <EOL> continue <EOL> if elno > <NUM_LIT> : <EOL> break <EOL> if element . VR not in ( '<STR_LIT>' , '<STR_LIT>' ) : <EOL> continue <EOL> name = asstr ( element . value ) <EOL> if is_regex : <EOL> if creator . search ( name ) is not None : <EOL> return elno * <NUM_LIT> <EOL> else : <EOL> if creator == name : <EOL> return elno * <NUM_LIT> <EOL> return None </s>
