<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_subnet_db_info(self, tenant_id, direc, net_id, subnet_id):
 """Update the subnet DB with Net and Subnet ID, given the subnet. """

        subnet_dict = self.retrieve_dcnm_subnet_info(tenant_id, direc)
        if not subnet_dict:
            LOG.error("Subnet dict not found for tenant %s", tenant_id)
            return
        subnet = subnet_dict['cidr'].split('/')[0]
        if direc == 'in':
            self.service_in_ip.update_subnet(subnet, net_id, subnet_id)
        else:
            self.service_out_ip.update_subnet(subnet, net_id, subnet_id)