def merge_profile():
 with _profile_lock:
  new_profile = sys.getdxp()
  if has_pairs(new_profile):
   for first_inst in range(len(_cumulative_profile)):
    for second_inst in range(len(_cumulative_profile[first_inst])):
     _cumulative_profile[first_inst][second_inst] += new_profile[first_inst][second_inst]
  else:
   for inst in range(len(_cumulative_profile)):
    _cumulative_profile[inst] += new_profile[inst]

def merge_profile ( ) : with _profile_lock : new_profile = sys . getdxp ( ) if has_pairs ( new_profile ) : for first_inst in range ( len ( _cumulative_profile ) ) : for second_inst in range ( len ( _cumulative_profile [ first_inst ] ) ) : _cumulative_profile [ first_inst ] [ second_inst ] += new_profile [ first_inst ] [ second_inst ] else : for inst in range ( len ( _cumulative_profile ) ) : _cumulative_profile [ inst ] += new_profile [ inst ]
reads sys .