<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def release_port(upnp, external_port):
 """Try to release the port mapping for `external_port`. Args: external_port (int):
 the port that was previously forwarded to. Returns: success (boolean):
 if the release was successful. """

    mapping = upnp.getspecificportmapping(external_port, 'UDP')

    if mapping is None:
        log.error('could not find a port mapping', external=external_port)
        return False
    else:
        log.debug('found existing port mapping', mapping=mapping)

    if upnp.deleteportmapping(external_port, 'UDP'):
        log.info('successfully released port mapping', external=external_port)
        return True

    log.warning(
        'could not release port mapping, check your router for stale mappings',
    )
    return False