class ShardingSphereSupplier implements Supplier<DataSource> {

    private final Properties properties;

    public ShardingSphereSupplier(Properties properties) {
        this.properties = properties;
    }

    @Override
    public DataSource get() {<FILL_FUNCTION_BODY>}
}

        try {
            String fileUri = properties.getProperty("file");
            if (Utils.isNotEmpty(fileUri)) {
                URL resource = ResourceUtil.findResource(fileUri);
                if (resource == null) {
                    throw new IllegalStateException("The sharding sphere configuration file does not exist");
                }
                try (InputStream in = resource.openStream()) {
                    byte[] bytes = IoUtil.transferToBytes(in);
                    return YamlShardingSphereDataSourceFactory.createDataSource(bytes);
                }
            }
            String configTxt = properties.getProperty("config");
            if (Utils.isNotEmpty(configTxt)) {
                return YamlShardingSphereDataSourceFactory.createDataSource(configTxt.getBytes());
            }
        } catch (Exception e) {
            throw new IllegalStateException("The sharding sphere configuration failed", e);
        }

        throw new IllegalStateException("Invalid sharding sphere configuration");
    
<no_super_class>