<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_python(self, value):
 """ Provide the ability to pass a RedisModel instances or a FK field as value instead of passing the PK. The value will then be translated in the real PK. """

        if isinstance(value, model.RedisModel):
            value = value._pk
        elif isinstance(value, SimpleValueRelatedFieldMixin):
            value = value.proxy_get()
        return value