def METHOD_NAME(self, url: str, data: List[Post]) -> None:
    try:
        if url not in self.files_names:
            raise ValueError(f"No filename associated with url: {url}")
        post_data = [post.__dict__ for post in data]
        with open(self.files_names[url], 'w', encoding='utf-8') as f:
            json.dump(post_data, f, ensure_ascii=False, indent=4)
    except Exception as e:
        raise WriteToFileError(f"Exception occurred while writing to file with message {e}")