def METHOD_NAME(self, cdb_cls):
    """Deserializes the json in the specified file info a CDB.
    If the `json_path` was specified to the constructor,
    the JSON serialized files are used.
    Otherwise, everything is loaded from the `main_path` file.
    Returns:
        CDB: The resulting CDB.
    """
    logger.info('Reading CDB data from %s', self.main_path)
    with open(self.main_path, 'rb') as f:
        data = dill.load(f)
    config = cast(Config, Config.from_dict(data['config']))
    cdb = cdb_cls(config=config)
    if self.jsons is None:
        cdb_main = data['cdb']
    else:
        cdb_main = data['cdb_main']
    # Load data into the new cdb instance
    for k in cdb.__dict__:
        if k in cdb_main:
            cdb.__dict__[k] = cdb_main[k]
    # Load data into new CDB from additional JSON files
    # if applicable
    if self.jsons is not None:
        for name in SPECIALITY_NAMES:
            if not os.path.exists(self.jsons[name].file_name):
                continue  # in case of non-memory-optimised where cui2many doesn't exist
            cdb.__dict__[name] = self.jsons[name].read()
    # if anything has
    # been registered to postprocess the CDBs
    default_postprocessing(cdb)
    return cdb