Modifications for Python API.