<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 chart module
This module relies on pygal library, so the returned charts are instances of pygal.chart. See options at 
pygal site
I made a JavaScript 'equivalent'
Step1:  Time Series
Step2:  Chart series
Step3:  Chart seriesByRegion
<ASSISTANT_TASK:>
Python Code:
import ee
from geetools import ui
test_site = ee.Geometry.Point([-71, -42])
test_feat = ee.Feature(test_site, {'name': 'test feature'})
test_featcol = ee.FeatureCollection([
    test_feat, 
    test_feat.buffer(100).set('name', 'buffer 100'),
    test_feat.buffer(1000).set('name', 'buffer 1000')
])
Explanation: chart module
This module relies on pygal library, so the returned charts are instances of pygal.chart. See options at 
pygal site
I made a JavaScript 'equivalent': https://code.earthengine.google.com/b2922b860b85c1120250794fb82dfda8
End of explanation
years = ee.List([2015, 2016, 2017, 2018])
col = ee.ImageCollection('COPERNICUS/S2').filterBounds(test_site)
def make_time_series(year):
    ''' make a time series from year's list '''
    eefilter = ee.Filter.calendarRange(year, field='year')
    filtered = col.filter(eefilter)
    return filtered.mean().set('system:time_start', ee.Date.fromYMD(year, 1, 1).millis())
time_series = ee.ImageCollection(years.map(make_time_series))
Explanation: Time Series
End of explanation
chart_ts = ui.chart.Image.series(**{
    'imageCollection': time_series, 
    'region': test_site,
    'scale': 10,
    'bands': ['B1', 'B2', 'B3'],
    # 'xProperty': 'B4', # You can use a band too!
    'labels': ['band B1', 'B2 band', 'this is B3']
})
chart_ts.render_widget(width='50%')
Explanation: Chart series
End of explanation
chart_ts_region = ui.chart.Image.seriesByRegion(**{
    'imageCollection': time_series,
    'reducer': ee.Reducer.median(),
    'regions': test_featcol,
    'scale': 10,
    'band': 'B11',
    'seriesProperty': 'name'
})
chart_ts_region.render_widget(height=500)
Explanation: Chart seriesByRegion
End of explanation
<END_TASK>