'Like a Python builtin dict object, setdefault returns the current value
for a key, and if it isn\'t there, stores the default value and returns it.
:param key: Dict key for this Variable
:type key: String
:param default: Default value to set and return if the variable
isn\'t already in the DB
:type default: Mixed
:param deserialize_json: Store this as a JSON encoded value in the DB
and un-encode it when retrieving a value
:return: Mixed'

@classmethod
def setdefault(cls, key, default, deserialize_json=False):

    default_sentinel = object()
    obj = Variable.get(key, default_var=default_sentinel, deserialize_json=False)
    if (obj is default_sentinel):
        if (default is not None):
            Variable.set(key, default, serialize_json=deserialize_json)
            return default
        else:
            raise ValueError(u'Default    Value    must    be    set')
    elif deserialize_json:
        return json.loads(obj.val)
    else:
        return obj.val
