def _get_model_by_id(api: ResourceAPI, resource_id: Union[UUID, str]) -> Optional[ResourceModel]:
    """Get a resource model by id if found. Otherwise, `None`."""
    try:
        if not isinstance(resource_id, UUID):
            resource_id = UUID(resource_id)
        return api.get(resource_id)
    except NotFoundError:
        pass
Get a resource model by id if found. Otherwise, `None`.
argilla/src/argilla/client.py