@classmethod
def from_document(cls, amostra_client, document):
    """
        Convert a dict returned by the server to our traitlets-based object.
        """
    uuid = document.pop('uuid')
    revision = document.pop('revision')
    instance = cls(amostra_client, **document)
    instance.set_trait('uuid', uuid)
    instance.set_trait('revision', revision)
    instance.observe(amostra_client._update)
    return instance
