<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_bitcoind_client(config_path=None, bitcoind_opts=None):
 """ Connect to bitcoind """

    if bitcoind_opts is None and config_path is None:
        raise ValueError("Need bitcoind opts or config path")

    bitcoind_opts = get_bitcoind_config(config_file=config_path)
    log.debug("Connect to bitcoind at %s:%s (%s)" % (bitcoind_opts['bitcoind_server'], bitcoind_opts['bitcoind_port'], config_path))
    client = connect_bitcoind_impl( bitcoind_opts )

    return client