def _start_date():
 year_ago = (date.today() - timedelta(days=365))
 return date(year_ago.year, year_ago.month, 1)

def _start_date ( ) : year_ago = ( date . today ( ) - timedelta ( days = 365 ) ) return date ( year_ago . year , year_ago . month , 1 )
the date from which we start querying monthly data .