<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_network_by_tenant(self, tenant_id):
 """Returns the network of a given tenant. """

        ret_net_lst = []
        try:
            net_list = self.neutronclient.list_networks(body={})
            for net in net_list.get('networks'):
                if net.get('tenant_id') == tenant_id:
                    ret_net_lst.append(net)
        except Exception as exc:
            LOG.error("Failed to get network by tenant %(tenant)s, "
                      "Exc %(exc)s",
                      {'tenant': tenant_id, 'exc': str(exc)})
        return ret_net_lst