def set_resource(self, resource_name: str, resource_path: Union[Path, str, ResourcePath, ResourcePathConfig]):
        """Set resource path.

        :param resource_name: name of the resource.
        :param resource_path: resource path.
        """
        if resource_name not in self.resource_paths:
            raise ValueError(f"{resource_name} is not a valid resource name.")
        if self.resource_paths[resource_name]:
            logger.debug(
                "Overriding %s from %s to %s.", resource_name, self.resource_paths[resource_name], resource_path
            )

        if resource_path is not None:
            resolved_resource_path = create_resource_path(resource_path)
            assert resolved_resource_path.is_local_resource_or_string_name(), (
                f"{resource_name} must be local path or string name."
            )
            resource_path = resolved_resource_path.get_path()

        self.resource_paths[resource_name] = resource_path
Set resource path.

        :param resource_name: name of the resource.
        :param resource_path: resource path.
        
olive/model/handler/mixin/resource.py