<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_from_previous_version(cls, previous_shadow, payload):
 """ set None to payload when you want to delete shadow """

        version, previous_payload = (previous_shadow.version + 1, previous_shadow.to_dict(include_delta=False)) if previous_shadow else (1, {})

        if payload is None:
            # if given payload is None, delete existing payload
            # this means the request was delete_thing_shadow
            shadow = FakeShadow(None, None, None, version, deleted=True)
            return shadow

        # we can make sure that payload has 'state' key
        desired = payload['state'].get(
            'desired',
            previous_payload.get('state', {}).get('desired', None)
        )
        reported = payload['state'].get(
            'reported',
            previous_payload.get('state', {}).get('reported', None)
        )
        shadow = FakeShadow(desired, reported, payload, version)
        return shadow