code: def is_screen_on(self):
          '''
          Checks if the screen is ON.
          Returns:
              True if the device screen is ON
          Raises:
              RuntimeError
          '''
  
          _screenOnRE = re.compile('mScreenOnFully=(true|false)')
          m = _screenOnRE.search(self.shell('dumpsys', 'window', 'policy'))
          if m:
              return (m.group(1) == 'true')
          raise RuntimeError("Couldn't determine screen ON state"f is_screen_on(self):
          '''
          Checks if the screen is ON.
          Returns:
              True if the device screen is ON
          Raises:
              RuntimeError
          '''
  
          _screenOnRE = re.compile('mScreenOnFully=(true|false)')
          m = _screenOnRE.search(self.shell('dumpsys', 'window', 'policy'))
          if m:
              return (m.group(1) == 'true')
          raise RuntimeError("Couldn't determine screen ON state")
docs: Checks if the screen is ON.
          Returns:
              True if the device screen is ON
          Raises:
              RuntimeError