docs: @Nullable
    public static URL uriToUrl(@Nullable Uri uri) {
      if (uri == null) {
        return null;
      }
  
      try {
        return new URL(uri.toString());
      } catch (java.net.MalformedURLException e) {
        // This should never happen since we got a valid uri
        throw new RuntimeException(e);
      }
    }