Avenatti sentenced to four years