What is the equivalent of the following syntax in Python:
ui.Chart.image.doySeriesByYear({
imageCollection: collection,
bandName: 'NDVI',
region: forest,
regionReducer: ee.Reducer.mean(),
scale: 500});