<s> """<STR_LIT>""" <EOL> import json <EOL> from itertools import islice , chain <EOL> from dateutil import parser <EOL> def batch ( iterable , size ) : <EOL> """<STR_LIT>""" <EOL> sourceiter = iter ( iterable ) <EOL> while <NUM_LIT:1> : <EOL> batchiter = islice ( sourceiter , size ) <EOL> yield list ( chain ( [ batchiter . next ( ) ] , batchiter ) ) <EOL> def date_str_to_date ( date_str ) : <EOL> if date_str : <EOL> return parser . parse ( date_str ) <EOL> def load_ontology ( filename ) : <EOL> """<STR_LIT>""" <EOL> with open ( filename , '<STR_LIT:rb>' ) as f : <EOL> return json . loads ( f . read ( ) ) </s>
