docs: def design_create(self, name, ddoc, use_devmode=True, syncwait=0):
          """
          Store a design document
  
          :param string name: The name of the design
          :param ddoc: The actual contents of the design document
  
          :type ddoc: string or dict
              If ``ddoc`` is a string, it is passed, as-is, to the server.
              Otherwise it is serialized as JSON, and its ``_id`` field is set to
              ``_design/{name}``.
  
          :param bool use_devmode:
              Whether a *development* mode view should be used. Development-mode
              views are less resource demanding with the caveat that by default
              they only operate on a subset of the data. Normally a view will
              initially be created in 'development mode', and then published
              using :meth:`design_publish`
  
          :param float syncwait:
              How long to poll for the action to complete. Server side design
              operations are scheduled and thus this function may return before
              the operation is actually completed. Specifying the timeout here
              ensures the client polls during this interval to ensure the
              operation has completed.
  
          :raise: :exc:`couchbase.exceptions.TimeoutError` if ``syncwait`` was
              specified and the operation could not be verified within the
              interval specified.
  
          :return: An :class:`~couchbase.result.HttpResult` object.
  
          .. seealso:: :meth:`design_get`, :meth:`design_delete`,
              :meth:`design_publish`
  
          """
          name = self._cb._mk_devmode(name, use_devmode)
  
          fqname = "_design/{0}".format(name)
          if not isinstance(ddoc, dict):
              ddoc = json.loads(ddoc)
  
          ddoc = ddoc.copy()
          ddoc['_id'] = fqname
          ddoc = json.dumps(ddoc)
  
          existing = None
          if syncwait:
              try:
                  existing = self.design_get(name, use_devmode=False)
              except CouchbaseError:
                  pass
  
          ret = self._cb._http_request(
              type=_LCB.LCB_HTTP_TYPE_VIEW, path=fqname,
              method=_LCB.LCB_HTTP_METHOD_PUT, post_data=ddoc,
              content_type="application/json")
  
          self._design_poll(name, 'add', existing, syncwait,
                            use_devmode=use_devmode)
          return ret