Get_fermi Function

What is the rationale behind the assumption below made within the get_fermi_interextrapolate function?

Similar to get_fermi except that when get_fermi fails to converge, an interpolated or extrapolated fermi (depending on c) is returned with the assumption that the fermi level changes linearly with log(abs{c}).

Also, what is the most logical approach for estimating the temperature dependence of the Fermi level utilizing the get_fermi and get_doping functions?
I have assumed the doping/carrier concentration is independent of temperature while only modifying the temp. value within get_fermi, otherwise (if ā€˜cā€™ is recalculated for each temp.) the resulting fermi level value does not vary with temperature.
I also modified the initial guess of the Fermi level (# initialize target fermi within the get_fermi function) to be the average of the band edge values instead of dos.efermi.