A Tower Research Capital market-data component receives an array of integer signals and a target value. Determine whether two distinct elements in the array have a sum exactly equal to the target.
Implement contains_pair_sum(nums, target) and return True if such a pair exists, otherwise return False. An element may not be used twice, but duplicate values at different indices may form a valid pair.
nums, a list of integers, and target, an integer.i and j such that i != j and nums[i] + nums[j] == target.def contains_pair_sum(nums, target):