def METHOD_NAME(self, path, exclude: Iterable[str] = SimpleFrozenList()):
    """We overwrite InMemoryLookupKB.to_disk() to ensure that self.custom_field is stored as well."""
    path = ensure_path(path)
    if not path.exists():
        path.mkdir(parents=True)
    if not path.is_dir():
        raise ValueError(Errors.E928.format(loc=path))
    def serialize_custom_fields(file_path: Path) -> None:
        srsly.write_json(file_path, {"custom_field": self.custom_field})
    serialize = {
        "contents": lambda p: self.write_contents(p),
        "strings.json": lambda p: self.vocab.strings.METHOD_NAME(p),
        "custom_fields": lambda p: serialize_custom_fields(p),
    }
    util.METHOD_NAME(path, serialize, exclude)