def get_blame(repo, file_path, newest_commit, oldest_refspec=None, min_line=1, max_line=None):  # pylint: disable=R0913
    kwargs = {
        'flags': (GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES | GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES),
        'newest_commit': newest_commit.id,
    }
    if oldest_refspec is not None:
        oldest_commit = get_commit_for_refspec(repo, oldest_refspec)
        kwargs['oldest_commit'] = oldest_commit.id
    if min_line > 1:
        kwargs['min_line'] = min_line
    if max_line is not None:
        kwargs['max_line'] = max_line

    try:
        return repo.blame(file_path, **kwargs)
    except KeyError as no_such_file_err:  # pragma: no cover
        raise NotFound(no_such_file_err.message)
    except __HOLE__:  # pragma: no cover
        raise BadRequest("path resolved to non-blob object")
dataset/ETHPy150Open hulu/restfulgit/restfulgit/porcelain/retrieval.py/get_blame