I defined a python class to work with Google Sheets API v4. And I created this method to auto resize a column according to its content, following the instructions in here: