def _bro2neo(rec):
 if ('id_orig_h' in rec):
  rec['src'] = rec.pop('id_orig_h')
 if ('id_resp_h' in rec):
  rec['dst'] = rec.pop('id_resp_h')
 if ('ts' in rec):
  rec['start_time'] = rec['end_time'] = rec.pop('ts')
 return rec

def _bro2neo ( rec ) : if ( 'id_orig_h' in rec ) : rec [ 'src' ] = rec . pop ( 'id_orig_h' ) if ( 'id_resp_h' in rec ) : rec [ 'dst' ] = rec . pop ( 'id_resp_h' ) if ( 'ts' in rec ) : rec [ 'start_time' ] = rec [ 'end_time' ] = rec . pop ( 'ts' ) return rec
prepares a document for db .