code: def _parse_content(self, text):
          '''Parses the content of a response doc into the correct
          format for .state.
          '''
          try:
              return json.loads(text)
          except ValueError:
              raise exc.UnexpectedlyNotJSON(
                  "The resource at {.uri} wasn't valid JSON", selff _parse_content(self, text):
          '''Parses the content of a response doc into the correct
          format for .state.
          '''
          try:
              return json.loads(text)
          except ValueError:
              raise exc.UnexpectedlyNotJSON(
                  "The resource at {.uri} wasn't valid JSON", self)
docs: Parses the content of a response doc into the correct
          format for .state.