def _check_asset(location, asset_name):
 content_location = StaticContent.compute_location(location.course_key, asset_name)
 try:
  contentstore().find(content_location)
 except NotFoundError:
  return False
 else:
  return True

def _check_asset ( location , asset_name ) : content_location = StaticContent . compute_location ( location . course_key , asset_name ) try : contentstore ( ) . find ( content_location ) except NotFoundError : return False else : return True
check that asset with asset_name exists in assets .