<s> def get_records ( base_url , http_get , data_record , target , ** kwargs ) : <EOL> url = _graphite_url_for_target ( base_url , target , ** kwargs ) <EOL> resp = http_get ( url , verify = True ) <EOL> resp . raise_for_status ( ) <EOL> records = [ ] <EOL> for line in resp . content . split ( '<STR_LIT:\n>' ) : <EOL> if line : <EOL> record = data_record ( line ) <EOL> records . append ( record ) <EOL> return records <EOL> def _graphite_url_for_target ( base , target , from_ = '<STR_LIT>' ) : <EOL> return '<STR_LIT>' . format ( <EOL> base , <EOL> target , <EOL> from_ <EOL> ) </s>
