code: def sql(self, dataset_key, query, desired_mimetype='application/json',
              **kwargs):
          
          api_client = self._build_api_client(
              default_mimetype_header_accept=desired_mimetype)
          sql_api = kwargs.get('sql_api_mock', _swagger.SqlApi(api_client))
          owner_id, dataset_id = parse_dataset_key(dataset_key)
          try:
              response = sql_api.sql_post(
                  owner_id, dataset_id, query, _preload_content=False, **kwargs)
              return six.BytesIO(response.data)
          except _swagger.rest.ApiException as e:
              raise RestApiError(cause=e)
docs: Executes SQL queries against a dataset via POST
  
          :param dataset_key: Dataset identifier, in the form of owner/id
          :type dataset_key: str
          :param query: SQL query
          :type query: str
          :param include_table_schema: Flags indicating to include table schema
              in the response
          :type include_table_schema: bool
          :returns: file object that can be used in file parsers and
              data handling modules.
          :rtype: file-like object
          :raises RestApiException: If a server error occurs
  
          Examples
          --------
          >>> import datadotworld as dw
          >>> api_client = dw.api_client()
          >>> api_client.sql('username/test-dataset', 'query') # doctest: +SKIP