<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _populate(self, soup):
 """ Populate the list, assuming ``soup`` is a ``BeautifulSoup`` object. """

        tables = soup.select('table[rules=all]')
        if not tables:
            return
        trs = tables[0].select('tr')[1:]

        if len(trs[0]) == 5:
            # M1
            self._populate_small_table(trs)
        else:
            # M2
            self._populate_large_table(trs)