code: def loads(data, validate=False, **kwargs):
      
      d = json.loads(data, **kwargs)
      content_spec = d["content-spec"]
      Payload = CONTENT_SPECS[content_spec]
      payload = Payload.load(d)
      if validate:
          errors = payload.problems()
          if errors:
              raise ValidationError(errors)
      return payload
docs: Load a PPMP message from the JSON-formatted string in `data`. When
      `validate` is set, raise `ValidationError`. Additional keyword
      arguments are the same that are accepted by `json.loads`,
      e.g. `indent` to get a pretty output.