<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def data_flows(self, data_flows):
 """ Setter for _data_flows field See property :param dict data_flows: Dictionary data_flows[data_flow_id] of :class:`rafcon.core.data_flow.DataFlow` :raises exceptions.TypeError: if the data_flows parameter has the wrong type :raises exceptions.AttributeError: if the keys of the data_flows dictionary and the data_flow_ids of the data flows in the dictionary do not match """

        if not isinstance(data_flows, dict):
            raise TypeError("data_flows must be of type dict")
        if [df_id for df_id, data_flow in data_flows.items() if not isinstance(data_flow, DataFlow)]:
            raise TypeError("element of data_flows must be of type DataFlow")
        if [df_id for df_id, data_flow in data_flows.items() if not df_id == data_flow.data_flow_id]:
            raise AttributeError("The key of the data flow dictionary and the id of the data flow do not match")

        old_data_flows = self._data_flows
        self._data_flows = data_flows
        data_flow_ids_to_delete = []
        for data_flow_id, data_flow in data_flows.items():
            try:
                data_flow.parent = self
            except (ValueError, RecoveryModeException) as e:
                if type(e) is RecoveryModeException:
                    logger.error("Recovery error: {0}\n{1}".format(str(e), str(traceback.format_exc())))
                    if e.do_delete_item:
                        data_flow_ids_to_delete.append(data_flow.data_flow_id)
                else:
                    self._data_flows = old_data_flows
                    raise

        self._data_flows = dict((data_flow_id, d) for (data_flow_id, d) in self._data_flows.items()
                                if data_flow_id not in data_flow_ids_to_delete)

        # check that all old_data_flows are no more referencing self as there parent
        for old_data_flow in old_data_flows.values():
            if old_data_flow not in self._data_flows.values() and old_data_flow.parent is self:
                old_data_flow.parent = None