<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_vhost(cls, vhost):
 """Retrieve webbacc id associated to a webacc vhost"""

        result = cls.list({'items_per_page': 500})
        webaccs = {}
        for webacc in result:
            for vhost in webacc['vhosts']:
                webaccs[vhost['name']] = webacc['id']
        return webaccs.get(vhost)