def list_datasets(
    client: httpx.Client,
    workspace_id: Optional[UUID] = None,
) -> Response[Union[list, List[FeedbackDatasetModel], ErrorMessage, HTTPValidationError]]:
    """Sends a GET request to `/api/v1/me/datasets` endpoint to retrieve a list of
    `FeedbackTask` datasets filtered by `workspace_id` if applicable.

    Args:
        client: the authenticated Argilla client to be used to send the request to the API.
        workspace_id: the id of the workspace to filter the datasets by. Note that the user
            should either be owner or have access to the workspace. Defaults to None.

    Returns:
        A `Response` object containing a `parsed` attribute with the parsed response if the
        request was successful, which is a list of `FeedbackDatasetModel` if any, otherwise
        it will contain an empty list.
    """
    url = "/api/v1/me/datasets"

    params = {}
    if workspace_id is not None:
        params["workspace_id"] = str(workspace_id)

    response = client.get(url=url, params=params)

    if response.status_code == 200:
        response_obj = Response.from_httpx_response(response)
        response_obj.parsed = [FeedbackDatasetModel(**dataset) for dataset in response.json()["items"]]
        return response_obj
    return handle_response_error(response)
Sends a GET request to `/api/v1/me/datasets` endpoint to retrieve a list of
    `FeedbackTask` datasets filtered by `workspace_id` if applicable.

    Args:
        client: the authenticated Argilla client to be used to send the request to the API.
        workspace_id: the id of the workspace to filter the datasets by. Note that the user
            should either be owner or have access to the workspace. Defaults to None.

    Returns:
        A `Response` object containing a `parsed` attribute with the parsed response if the
        request was successful, which is a list of `FeedbackDatasetModel` if any, otherwise
        it will contain an empty list.
    
argilla-v1/src/argilla_v1/client/sdk/v1/datasets/api.py