@classmethod
def _from_dict(cls, _dict):
    """Initialize a MetricTokenAggregationResult object from a json dictionary."""
    args = {}
    if 'key' in _dict:
        args['key'] = _dict.get('key')
    if 'matching_results' in _dict:
        args['matching_results'] = _dict.get('matching_results')
    if 'event_rate' in _dict:
        args['event_rate'] = _dict.get('event_rate')
    return cls(**args)
