def _fetch(self):
    result = self.reader.fetch_value(self.state_key)
    for wrapper in result.data:
      for item in wrapper.data:
        for value in item.values:
          if value.value.data == '':  # pylint: disable=g-explicit-bool-comparison
            # When uninitialized, Windmill returns the empty string as the
            # initial value.
            self.value = None
          else:
            try:
              self.value = decode_value(value.value.data)
            except Exception:  # pylint: disable=broad-except
              logging.error(
                  'Error: could not decode value for key %r; '
                  'setting to None: %r.',
                  self.state_key, value.value.data)
              self.value = None
    self.fetched = True
Fetch state from Windmill.
dataset/ETHPy150Open GoogleCloudPlatform/DataflowPythonSDK/google/cloud/dataflow/worker/windmillstate.py/WindmillValueAccessor._fetch