docs: def upload_file(self, owner, id, name, **kwargs):
          """
          Upload file
          Upload one file at a time to a dataset.  This endpoint expects requests of type `application/octet-stream`.  For example, assuming that you want to upload a local file named `file1.csv` to a hypothetical dataset `https://data.world/awesome-user/awesome-dataset` and choose its name on data.world to be `better-name.csv`, this is what the cURL command would look like.  ```bash curl \\   -H \"Authorization: Bearer <YOUR_API_TOKEN>\" \\   -X PUT -H \"Content-Type: application/octet-stream\" \\   --data-binary @file1.csv \\   https://api.data.world/v0/uploads/awesome-user/awesome-dataset/files/better-name.csv ```  This method of upload is typically not supported by Swagger clients. Other HTTP clients can be used to supply the contents of the file directly in the body of the request.
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please define a `callback` function
          to be invoked when receiving the response.
          >>> def callback_function(response):
          >>>     pprint(response)
          >>>
          >>> thread = api.upload_file(owner, id, name, callback=callback_function)
  
          :param callback function: The callback function
              for asynchronous request. (optional)
          :param str owner: User name and unique identifier of the creator of a dataset or project. For example, in the URL: [https://data.world/jonloyens/an-intro-to-dataworld-dataset](https://data.world/jonloyens/an-intro-to-dataworld-dataset), jonloyens is the unique identifier of the owner. (required)
          :param str id: Dataset unique identifier. For example, in the URL:[https://data.world/jonloyens/an-intro-to-dataworld-dataset](https://data.world/jonloyens/an-intro-to-dataworld-dataset), an-intro-to-dataworld-dataset is the unique identifier of the dataset. (required)
          :param str name: File name and unique identifier within dataset. (required)
          :param bool expand_archive: Indicates whether a compressed file should be expanded upon upload.
          :return: SuccessMessage
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('callback'):
              return self.upload_file_with_http_info(owner, id, name, **kwargs)
          else:
              (data) = self.upload_file_with_http_info(owner, id, name, **kwargs)
              return data