'Deserialize KeyRange from its json representation.
Args:
json_str: string with json representation created by key_range_to_json.
Returns:
deserialized KeyRange instance.'

@staticmethod
def from_json(json_str):

    if (simplejson is None):
        raise SimplejsonUnavailableError('JSON    functionality    requires    json    or    simplejson    to    be    available')
    def key_from_str(key_str):
        if key_str:
            return db.Key(key_str)
        else:
            return None
    json = simplejson.loads(json_str)
    return KeyRange(key_from_str(json['key_start']), key_from_str(json['key_end']), json['direction'], json['include_start'], json['include_end'], json.get('namespace'), _app=json.get('_app'))
