<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_action_arguments(self, target_state_m):
 """ Collect argument attributes for action signal Use non empty list dict to create arguments for action signal msg and logger messages. The action parent model can be different then the target state model because logical and data port changes also may influence the linkage, see action-module (undo/redo). :param rafcon.gui.models.abstract_state.AbstractStateModel target_state_m: State model of target of action :return: dict with lists of elements part of the action, action parent model """

        non_empty_lists_dict = {key: elems for key, elems in self.model_copies.items() if elems}
        port_attrs = ['input_data_ports', 'output_data_ports', 'scoped_variables', 'outcomes']
        port_is_pasted = any([key in non_empty_lists_dict for key in port_attrs])
        return non_empty_lists_dict, target_state_m.parent if target_state_m.parent and port_is_pasted else target_state_m