<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unserialize(self, data):
 """ From JSON -> Activity object """


        # copy activity attributes into object
        if "author" not in data["object"]:
            data["object"]["author"] = data["actor"]
        for key in ["to", "cc", "bto", "bcc"]:
            if key not in data["object"] and key in data:
                data["object"][key] = data[key]

        Mapper(pypump=self._pump).parse_map(self, data=data)
        self._add_links(data)

        return self