parameters: (filename, work_directory, source_url)
return_statement: return filepath
docstring: Download the data from source url, unless it's already here.
  
    Args:
        filename: string, name of the file in the directory.
        work_directory: string, path to working directory.
        source_url: url to download from if file doesn't exist.
  
    Returns:
        Path to resulting file.
docstring_summary: Download the data from source url, unless it's already here.
docstring_tokens: Download the data from source url unless it s already here .
function: def maybe_download(filename, work_directory, source_url):
    """Download the data from source url, unless it's already here.
  
    Args:
        filename: string, name of the file in the directory.
        work_directory: string, path to working directory.
        source_url: url to download from if file doesn't exist.
  
    Returns:
        Path to resulting file.
    """
    if not gfile.Exists(work_directory):
      gfile.MakeDirs(work_directory)
    filepath = os.path.join(work_directory, filename)
    if not gfile.Exists(filepath):
      with tempfile.NamedTemporaryFile() as tmpfile:
        temp_file_name = tmpfile.name
        urllib.request.urlretrieve(source_url, temp_file_name)
        gfile.Copy(temp_file_name, filepath)
        with gfile.GFile(filepath) as f:
          size = f.Size()
        print('Successfully downloaded', filename, size, 'bytes.')
    return filepath
function_tokens: def maybe_download ( filename , work_directory , source_url ) : if not gfile . Exists ( work_directory ) : gfile . MakeDirs ( work_directory ) filepath = os . path . join ( work_directory , filename ) if not gfile . Exists ( filepath ) : with tempfile . NamedTemporaryFile ( ) as tmpfile : temp_file_name = tmpfile . name urllib . request . urlretrieve ( source_url , temp_file_name ) gfile . Copy ( temp_file_name , filepath ) with gfile . GFile ( filepath ) as f : size = f . Size ( ) print ( 'Successfully downloaded' , filename , size , 'bytes.' ) return filepath