<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_value(self, key, context):
 """Works out whether key is a value or if it's a variable referencing a value in context and returns the correct value. """

        string_quotes = ('"', "'")

        if key[0] in string_quotes and key[-1] in string_quotes:
            return key[1:-1]
        if key in string.digits:
            return int(key)
        return context.get(key, None)