parameters: (self, target_temp, wait_period=180)
docstring: Lets device sit to give battery time to cool down
      Args:
        temp: maximum temperature to allow in tenths of degrees c.
        wait_period: time in seconds to wait between checking.
docstring_summary: Lets device sit to give battery time to cool down
      Args:
        temp: maximum temperature to allow in tenths of degrees c.
        wait_period: time in seconds to wait between checking.
docstring_tokens: Lets device sit to give battery time to cool down Args : temp : maximum temperature to allow in tenths of degrees c . wait_period : time in seconds to wait between checking .
function: def LetBatteryCoolToTemperature(self, target_temp, wait_period=180):
      """Lets device sit to give battery time to cool down
      Args:
        temp: maximum temperature to allow in tenths of degrees c.
        wait_period: time in seconds to wait between checking.
      """
      def cool_device():
        temp = self.GetBatteryInfo().get('temperature')
        if temp is None:
          logging.warning('Unable to find current battery temperature.')
          temp = 0
        else:
          logging.info('Current battery temperature: %s', temp)
        if int(temp) <= target_temp:
          return True
        else:
          if self._cache['profile']['name'] == 'Nexus 5':
            self._DischargeDevice(1)
          return False
  
      self._DiscoverDeviceProfile()
      self.EnableBatteryUpdates()
      logging.info('Waiting for the device to cool down to %s (0.1 C)',
                   target_temp)
      timeout_retry.WaitFor(cool_device, wait_period=wait_period)
function_tokens: def LetBatteryCoolToTemperature ( self , target_temp , wait_period = 180 ) : def cool_device ( ) : temp = self . GetBatteryInfo ( ) . get ( 'temperature' ) if temp is None : logging . warning ( 'Unable to find current battery temperature.' ) temp = 0 else : logging . info ( 'Current battery temperature: %s' , temp ) if int ( temp ) <= target_temp : return True else : if self . _cache [ 'profile' ] [ 'name' ] == 'Nexus 5' : self . _DischargeDevice ( 1 ) return False self . _DiscoverDeviceProfile ( ) self . EnableBatteryUpdates ( ) logging . info ( 'Waiting for the device to cool down to %s (0.1 C)' , target_temp ) timeout_retry . WaitFor ( cool_device , wait_period = wait_period )