<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getK1(self, type='simu'):
 """ get quad k1 value :param type: 'simu' or 'online' :return: quad strength,i.e. k1 """

        if type == 'ctrl':
            pv = self.ctrlinfo.get('k1')['pv']
            rval = epics.caget(pv)
            if rval is None:
                val = self.getConfig(type='simu')['k1']
            else:
                val = self.unitTrans(rval, direction='+')
            return val
        else:
            return self.getConfig(type='simu')['k1']