code: def _join_json_files(cls, prefix, clear=False):
          
          filetype_list = ['entities', 'events', 'sentences']
          json_dict = {}
          try:
              for filetype in filetype_list:
                  fname = prefix + '.uaz.' + filetype + '.json'
                  with open(fname, 'rt') as f:
                      json_dict[filetype] = json.load(f)
                  if clear:
                      remove(fname)
                      logger.debug("Removed %s." % fname)
          except IOError as e:
              logger.error(
                  'Failed to open JSON files for %s; REACH error?' % prefix
                  )
              logger.exception(e)
              return None
          return json_dict
docs: Join different REACH output JSON files into a single JSON object.
  
          The output of REACH is broken into three files that need to be joined
          before processing. Specifically, there will be three files of the form:
          `<prefix>.uaz.<subcategory>.json`.
  
          Parameters
          ----------
          prefix : str
              The absolute path up to the extensions that reach will add.
          clear : bool
              Default False - if True, delete the files as soon as they are
              loaded.
  
          Returns
          -------
          json_obj : dict
              The result of joining the files, keyed by the three subcategories.