def METHOD_NAME(self, resource: Resource) -> Generator[Path, None, None]:
    """Persists data for a given resource.
    This `Resource` can then be accessed in dependent graph nodes via
    `model_storage.read_from`.
    Args:
        resource: The resource which should be persisted.
    Returns:
        A directory which can be used to persist data for the given `Resource`.
    """
    ...