<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get(self, key, *val):
 """Get value stored for current running task. Optionally you may provide the default value. Raises `KeyError` when can't get the value and no default one is provided. """

        data = self.get_data()
        if data is not None:
            return data.get(key, *val)
        if val:
            return val[0]
        raise KeyError(key)