Create model run object from JSON document retrieved from database.

        Parameters
        ----------
        document : JSON
            Json document in database

        Returns
        -------
        PredictionHandle
            Handle for model run object

def from_dict(self, document):
        """Create model run object from JSON document retrieved from database.

        Parameters
        ----------
        document : JSON
            Json document in database

        Returns
        -------
        PredictionHandle
            Handle for model run object
        """
        # Get object identifier from Json document
        identifier = str(document['_id'])
        # Directories are simply named by object identifier
        directory = os.path.join(self.directory, identifier)
        # Create attachment descriptors
        attachments = {}
        for obj in document['attachments']:
            attachment = Attachment.from_dict(obj)
            attachments[attachment.identifier] = attachment
        # Create model run handle.
        return ModelRunHandle(
            identifier,
            document['properties'],
            directory,
            ModelRunState.from_dict(document['state']),
            document['experiment'],
            document['model'],
            attribute.attributes_from_dict(document['arguments']),
            attachments=attachments,
            schedule=document['schedule'],
            timestamp=datetime.datetime.strptime(
                document['timestamp'], '%Y-%m-%dT%H:%M:%S.%f'
            ),
            is_active=document['active']
        )