def download_data(self, train_mode):
    """Download data from official sources.

    Args:
      train_mode: string, whether we are in train, dev or test mode
    """

    # Open the url and download the data with progress bars.
    data_stream = requests.get(self._url, stream=True)
    with open(self._zipped_data, 'wb') as f:
      for chunk in data_stream.iter_content(1024):
        if chunk:
          f.write(chunk)
          f.flush()

    # Next step is extracting the data.
    print('problem_log: Extracting data to ' + self._zipped_data + '.')
    self.extract_data(train_mode)
Download data from official sources.

    Args:
      train_mode: string, whether we are in train, dev or test mode
    
tensor2tensor/data_generators/dialog_abstract.py