def get_riemann(riemann_arg, default_ttl, log_param):
    import bernhard
    client = None
    if riemann_arg:
        global log
        log = log_param
        protocol, host, port = riemann_arg.split(':')
        port = int(port)
        if protocol == 'udp':
            proto_impl = bernhard.UDPTransport
        elif protocol == 'tcp':
            proto_impl = bernhard.TCPTransport
        else:
            log.error(protocol % "protocol [%s] is not valid.  Should be udp or tcp")
        client = bernhard.Client(host, port, transport = proto_impl)
    return RiemannReporter(client, default_ttl)
dataset/ETHPy150Open spotify/docker-stress/spotify/docker_stress/riemann_util.py/get_riemann/swapped operands of `%`