How would you find the maximum sum within a diamond-shaped range of a given side length in a square matrix?