@classmethod
def _from_dict(cls, _dict):
    """Initialize a QueryPassages object from a json dictionary."""
    args = {}
    if 'document_id' in _dict:
        args['document_id'] = _dict.get('document_id')
    if 'passage_score' in _dict:
        args['passage_score'] = _dict.get('passage_score')
    if 'passage_text' in _dict:
        args['passage_text'] = _dict.get('passage_text')
    if 'start_offset' in _dict:
        args['start_offset'] = _dict.get('start_offset')
    if 'end_offset' in _dict:
        args['end_offset'] = _dict.get('end_offset')
    if 'field' in _dict:
        args['field'] = _dict.get('field')
    return cls(**args)
