<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _setup_sentry_client(context):
 """Produce and configure the sentry client."""


    # get_secret will be deprecated soon
    dsn = os.environ.get("SENTRY_DSN")
    try:
        client = raven.Client(dsn, sample_rate=SENTRY_SAMPLE_RATE)
        client.user_context(_sentry_context_dict(context))
        return client
    except:
        rlogger.error("Raven client error", exc_info=True)
        return None