input: Write a python function that calculates the total XOR sum of all pairs within a provided list of integers.
  assert calculate_pairwise_xor_sum([5,9,7,6],4) == 47
  assert calculate_pairwise_xor_sum([7,3,5],3) == 12
  assert calculate_pairwise_xor_sum([7,3],2) == 4
output: def calculate_pairwise_xor_sum(arr, n):
      total_xor_sum = 0
      for i in range(n):
          for j in range(i + 1, n):
              total_xor_sum += arr[i] ^ arr[j]
      return total_xor_sum