def METHOD_NAME(blob_key, local_file):
  """Copy data stored in the blobstore to a local file."""
  assert not environment.is_running_on_app_engine()
  directory = os.path.dirname(local_file)
  if not os.path.exists(directory):
    os.makedirs(directory)
  gcs_path = get_gcs_path(blob_key)
  return storage.copy_file_from(gcs_path, local_file)