<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_diff_endpoints_from_commit_range(repo, commit_range):
 """Get endpoints of a diff given a commit range The resulting endpoints can be diffed directly:: a, b = get_diff_endpoints_from_commit_range(repo, commit_range) a.diff(b) For details on specifying git diffs, see ``git diff --help``. For details on specifying revisions, see ``git help revisions``. Args: repo (git.Repo):
 Repo object initialized with project root commit_range (str):
 commit range as would be interpreted by ``git diff`` command. Unfortunately only patterns of the form ``a..b`` merge-base of a and b and uses it as the starting point for the diff. Returns: Tuple[git.Commit, git.Commit]: starting commit, ending commit ( inclusive) Raises: ValueError: commit_range is empty or ill-formed See also: <https://stackoverflow.com/q/7251477> """

    if not commit_range:
        raise ValueError('commit_range cannot be empty')

    result = re_find(COMMIT_RANGE_REGEX, commit_range)
    if not result:
        raise ValueError(
            'Expected diff str of the form \'a..b\' or \'a...b\' (got {})'
            .format(commit_range))
    a, b = result['a'], result['b']
    a, b = repo.rev_parse(a), repo.rev_parse(b)
    if result['thirddot']:
        a = one_or_raise(repo.merge_base(a, b))
    return a, b