def METHOD_NAME(self, spentShots=None):
    if spentShots is not None:
        spentShots = max(self.numShots, spentShots)
    else:
        spentShots = self.numShots
    rearm_time = (self.REARM_TIME_MAPPING[self.fighter.getModifiedItemAttr("fighterSquadronRole")] or 0 if self.hasCharges else 0)
    return self.fighter.getModifiedItemAttr("fighterRefuelingTime") + rearm_time * spentShots