code: def save_matches(self, matches):
          
          if not os.path.exists(os.path.dirname(self.location())):
              os.makedirs(os.path.dirname(self.location()))
  
          with open(self.location(), "w+") as f:
              matches = [m for m in matches if not m['processed']]
              for m in matches:
                  match_obj = json.dumps(m)
                  f.write(match_obj + "\n")
docs: Save matches of a failed execution to the log.
  
          :param matches: a list of matches in JSON format