def get_versioned_asset_url(asset_path):
 try:
  locator = StaticContent.get_location_from_path(asset_path)
  content = AssetManager.find(locator, as_stream=True)
  return StaticContent.add_version_to_asset_path(asset_path, content.content_digest)
 except (InvalidKeyError, ItemNotFoundError):
  pass
 return asset_path

def get_versioned_asset_url ( asset_path ) : try : locator = StaticContent . get_location_from_path ( asset_path ) content = AssetManager . find ( locator , as_stream = True ) return StaticContent . add_version_to_asset_path ( asset_path , content . content_digest ) except ( InvalidKeyError , ItemNotFoundError ) : pass return asset_path
creates a versioned asset url .