code: func (i *Client) Fetch(c context.Context, digest isolated.HexDigest, dest io.Writer) error {
  	// Perform initial request.
  	name := ""
  	switch i.h {
  	case crypto.SHA1:
  		name = "sha-1"
  	case crypto.SHA256:
  		name = "sha-256"
  	case crypto.SHA512:
  		name = "sha-512"
  	}
  	url := i.url + "/_ah/api/isolateservice/v1/retrieve"
  	in := &isolateservice.HandlersEndpointsV1RetrieveRequest{
  		Digest: string(digest),
  		Namespace: &isolateservice.HandlersEndpointsV1Namespace{
  			DigestHash: name,
  			Namespace:  i.namespace,
  		},
  		Offset: 0,
  	}
  	var out isolateservice.HandlersEndpointsV1RetrievedContent
  	if _, err := lhttp.PostJSON(c, i.retryFactory, i.authClient, url, nil, in, &out); err != nil {
  		return err
  	}
  
  	// Handle DB items.
  	if out.Content != "" {
  		decoded, err := base64.StdEncoding.DecodeString(out.Content)
  		if err != nil {
  			return err
  		}
  		decompressor, err := isolated.GetDecompressor(i.namespace, bytes.NewReader(decoded))
  		if err != nil {
  			return err
  		}
  		defer decompressor.Close()
  		_, err = io.Copy(dest, decompressor)
  		return err
  	}
  
  	// Handle GCS items.
  	return i.gcsHandler.Fetch(c, i, out, dest)
  }
docs: // Fetch downloads an item from the server.