parameters: (filename, data, overwrite_warning=True)
docstring: Saves the data to a data file with the given name.
  
    Overwrites any data file with that specified name (a data file is a file with
    the mime type DATA_MIMETYPE).
  
    Args:
      filename: The file name to save to
      data: The data to write
      overwrite_warning: Whether to display a warning dialog for overwrites
docstring_summary: Saves the data to a data file with the given name.
docstring_tokens: Saves the data to a data file with the given name .
function: def SaveFile(filename, data, overwrite_warning=True):
    """Saves the data to a data file with the given name.
  
    Overwrites any data file with that specified name (a data file is a file with
    the mime type DATA_MIMETYPE).
  
    Args:
      filename: The file name to save to
      data: The data to write
      overwrite_warning: Whether to display a warning dialog for overwrites
    """
  
    if not _ObtainOAuthToken():
      return
  
    file_id = _FindFile(filename)
    if file_id is None:
      # create new file
      file_id = _UploadFile(data)
  
      # Update its metadata
      _DoRequest('PATCH', FILES_BASE_URL + '/' + file_id,
                 headers=[('Content-Type', 'application/json')],
                 data=json.dumps({'title': filename}))
    else:
      # overwrite existing file, after prompting user
      message = 'Really overwrite file %s ?' % filename
      title = 'File Exists in Drive'
      if overwrite_warning:
        if not colabtools.message.DisplayDialog(message, title):
          return
      _UploadFile(data, file_id=file_id)
function_tokens: def SaveFile ( filename , data , overwrite_warning = True ) : if not _ObtainOAuthToken ( ) : return file_id = _FindFile ( filename ) if file_id is None : # create new file file_id = _UploadFile ( data ) # Update its metadata _DoRequest ( 'PATCH' , FILES_BASE_URL + '/' + file_id , headers = [ ( 'Content-Type' , 'application/json' ) ] , data = json . dumps ( { 'title' : filename } ) ) else : # overwrite existing file, after prompting user message = 'Really overwrite file %s ?' % filename title = 'File Exists in Drive' if overwrite_warning : if not colabtools . message . DisplayDialog ( message , title ) : return _UploadFile ( data , file_id = file_id )