    def get(self, name: str, version: str | None) -> BentoSchema:
        """Get a bento by name and version

        Args:
            name: The name of the bento
            version: The version of the bento

        Returns:
            The bento
        """
        rest_client = self._client
        if version is None or version == "latest":
            res = rest_client.v1.list_bentos(bento_repository_name=name)
            if res is None:
                raise BentoMLException("List bento request failed")
            return res.items[0]
        res = rest_client.v1.get_bento(bento_repository_name=name, version=version)
        if res is None:
            raise NotFound(f'Bento "{name}:{version}" not found')
        return res
Get a bento by name and version

Args:
name: The name of the bento
version: The version of the bento

Returns:
The bento
src/bentoml/_internal/cloud/bento.py