@classmethod
def _from_dict(cls, _dict):
    """Initialize a ClassResult object from a json dictionary."""
    args = {}
    if 'class' in _dict or 'class_name' in _dict:
        args['class_name'] = _dict.get('class') or _dict.get('class_name')
    else:
        raise ValueError(
            "Required property 'class' not present in ClassResult JSON")
    if 'score' in _dict:
        args['score'] = _dict.get('score')
    else:
        raise ValueError(
            "Required property 'score' not present in ClassResult JSON")
    if 'type_hierarchy' in _dict:
        args['type_hierarchy'] = _dict.get('type_hierarchy')
    return cls(**args)
