def METHOD_NAME(repo_id, begin_date=None, end_date=None):
    """
    Timeseries of pull request acceptance rate (expressed as the ratio of pull requests merged on a date to the count of pull requests opened on a date)
    :param repo_group_id: The repository's repo_group_id
    :param repo_id: The repository's repo_id, defaults to None
    :return: DataFrame with ratio/day
    """
    if not begin_date:
        begin_date = '1970-1-1 00:00:01'
    if not end_date:
        end_date = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
    pr_acceptance_rate_sql = s.sql.text("""
        SELECT SUM
            ( EXTRACT ( EPOCH FROM ( pr_merged_at - pr_created_at ) ) ) / COUNT ( * ) AS duration
        FROM
            pull_requests
            JOIN repo ON pull_requests.repo_id = repo.repo_id
        WHERE
            pull_requests.repo_id = :repo_id
            AND pr_merged_at IS NOT NULL
            AND pr_created_at BETWEEN :begin_date
            AND :end_date
    """)
    results = pd.read_sql(pr_acceptance_rate_sql, engine, params={'repo_id': repo_id,
                                                        'begin_date': begin_date, 'end_date': end_date})
    if results.iloc[0]['duration'] is None:
        results.iloc[0]['duration'] = -1
    else:
        results.iloc[0]['duration'] = results.iloc[0]['duration'] / 60 / 60 / 24
    return results