docs: def make_tm_request(method, uri, **kwargs):
      """
      Make a request to TextMagic REST APIv2.
  
      :param str method: "POST", "GET", "PUT" or "DELETE"
      :param str uri:    URI to process request.
      :return: :class:`Response`
      """
      headers = kwargs.get("headers", {})
  
      user_agent = "textmagic-python/%s (Python %s)" % (
          __version__,
          platform.python_version()
      )
      headers["User-agent"] = user_agent
      headers["Accept-Charset"] = "utf-8"
      if "Accept-Language" not in headers:
          headers["Accept-Language"] = "en-us"
  
      if (method == "POST" or method == "PUT") and "Content-Type" not in headers:
          headers["Content-Type"] = "application/x-www-form-urlencoded"
  
      kwargs["headers"] = headers
  
      if "Accept" not in headers:
          headers["Accept"] = "application/json"
  
      headers["X-TM-Username"], headers["X-TM-Key"] = kwargs["auth"]
  
      response = make_request(method, uri, **kwargs)
  
      if not response.ok:
          try:
              resp_body = json.loads(response.content)
              message = resp_body["message"]
              errors = resp_body["errors"]
          except:
              message = response.content
              errors = None
  
          raise TextmagicRestException(status=response.status, method=method, uri=response.url,
                                       msg=message, errors=errors)
  
      return response