<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_data_flow(self, from_state_id, from_data_port_id, to_state_id, to_data_port_id, data_flow_id=None):
 """Adds a data_flow to the container state :param from_state_id: The id source state of the data_flow :param from_data_port_id: The output_key of the source state :param to_state_id: The id target state of the data_flow :param to_data_port_id: The input_key of the target state :param data_flow_id: an optional id for the data flow """

        data_flow_id = self.check_data_flow_id(data_flow_id)

        self.data_flows[data_flow_id] = DataFlow(from_state_id, from_data_port_id, to_state_id, to_data_port_id,
                                                 data_flow_id, self)
        return data_flow_id