def METHOD_NAME(sentry_mconfig: mconfigs_pb2.SharedSentryConfig) -> SharedSentryConfig:
    """Get Sentry configs with the following priority
    1) control_proxy.yml (if sentry_python_url is present)
    2) shared mconfig (i.e. first try streamed mconfig from orc8r,
    if empty: default mconfig in /etc/magma)
    Args:
        sentry_mconfig (SharedSentryConfig): proto message of shared mconfig
    Returns:
        (str, float): sentry url, sentry sample rate
    """
    dsn = get_service_config_value(
        CONTROL_PROXY,
        SENTRY_URL,
        default='',
    )
    if not dsn:
        # Here, we assume that `dsn` and `sample_rate` should be pulled
        # from the same source, that is the source where the user has
        # entered the `dsn`.
        # Without this coupling `dsn` and `sample_rate` could possibly
        # be pulled from different sources.
        dsn = sentry_mconfig.dsn_python
        sample_rate = sentry_mconfig.sample_rate
    else:
        logging.info("Sentry config: dsn_python and sample_rate are pulled from control_proxy.yml.")
        sample_rate = get_service_config_value(
            CONTROL_PROXY,
            SENTRY_SAMPLE_RATE,
            default=DEFAULT_SAMPLE_RATE,
        )
    # Exclusion patterns only exist in mconfig, not in control_proxy.yml
    exclusion_patterns = sentry_mconfig.exclusion_patterns
    return SharedSentryConfig(dsn, sample_rate, exclusion_patterns)