def METHOD_NAME(asset):
    gateway = None
    if not asset.is_gateway and asset.domain:
        gateway = asset.domain.select_gateway()
    if not gateway:
        return
    remote_bind_address = (
        urlparse(asset.address).hostname,
        urlparse(asset.address).port or 443
    )
    server = SSHTunnelForwarder(
        (gateway.address, gateway.port),
        ssh_username=gateway.username,
        ssh_password=gateway.password,
        ssh_pkey=gateway.private_key_path,
        remote_bind_address=remote_bind_address
    )
    try:
        server.start()
    except BaseSSHTunnelForwarderError:
        err_msg = 'Gateway is not active: %s' % asset.get('name', '')
        print('\033[31m %s \033[0m\n' % err_msg)
    return server