<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_context(cls, context):
 """Create a `cls` entity from a context."""

        return cls(id=context.id, context=context.to_dict())