prototype for python public API.