<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def value(self):
 """returns the values as a dictionary"""

        val = {}
        for k in self.__allowed_keys:
            value = getattr(self, "_" + k)
            if value is not None:
                val[k] = value
        return val