@staticmethod
def _append_step_results(tx_result: 'TransactionResult', context:
    'IconScoreContext', step_used_details: dict) ->int:
    """
        Appends step usage information to TransactionResult
        """
    final_step_used = sum(step_used_details.values())
    tx_result.step_used = final_step_used
    tx_result.cumulative_step_used = (context.cumulative_step_used +
        final_step_used)
    if final_step_used != step_used_details.get(context.msg.sender, 0):
        tx_result.step_used_details = step_used_details
    return final_step_used
