<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_dict(self, data, recursive=1):
 """Populate the resource from a python dict :param recursive: level of recursion for fetching resources :type recursive: int """

        # Find other linked resources
        data = self._encode_resource(data, recursive=recursive)
        self.data = data