def METHOD_NAME(data_dir, file_name, url):
  """Download CIFAR if not already downloaded."""
  filepath = os.path.join(data_dir, file_name)
  if tf.gfile.Exists(filepath):
    return filepath
  if not tf.gfile.Exists(data_dir):
    tf.gfile.MakeDirs(data_dir)
  urllib.request.urlretrieve(url, filepath)
  tarfile.open(os.path.join(filepath), 'r:gz').extractall(data_dir)
  return filepath