code: def write_data_to_file(data, filepath):
      '''
      Write data to file
      '''
      try:
          os.makedirs(os.path.dirname(filepath), 0o700)
      except OSError:
          pass
  
      write_to_disk(filepath, content=dataf write_data_to_file(data, filepath):
      '''
      Write data to file
      '''
      try:
          os.makedirs(os.path.dirname(filepath), 0o700)
      except OSError:
          pass
  
      write_to_disk(filepath, content=data)
docs: Write data to file