<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def adjust_obscov_resfile(self, resfile=None):
 """reset the elements of obscov by scaling the implied weights based on the phi components in res_file so that the total phi is equal to the number of non-zero weights. Parameters resfile : str residual file to use. If None, residual file with case name is sought. default is None Note ---- calls pyemu.Pst.adjust_weights_resfile() """

        self.pst.adjust_weights_resfile(resfile)
        self.__obscov.from_observation_data(self.pst)