Hi,
I am not sure if the code is to find the bandwidth, but in my opinion bandwidth must not exist for a high pass filter since it is able to pass all the frequency components above a certain cutoff frequency. So, a cutoff frequency make sense but bandwidth for a high pass filter is not something which can be find.