def METHOD_NAME(hunks, line):
    # type: (List[Hunk], LineNo) -> Optional[Hunk]
    # Assumes `hunks` are sorted
    for hunk in hunks:
        if line < hunk.b_start:
            break
        # Assume a length of "2" for removal only hunks so the
        # user can actually grab them exactly on the line above
        # *or* below the removal gutter mark which is a triangle
        # between two lines.
        if hunk_of_removals_only(hunk):
            b_end = hunk.b_start + 2
        else:
            b_end = hunk.b_start + max(hunk.b_length, 1)
        if hunk_with_no_newline_marker(hunk):
            # Make the hit area one line longer so that the user
            # can stage being on the last line of the view (if the
            # newline gets *added* in this hunk). This is technially
            # wrong if the newline gets *removed* but doesn't do any
            # harm because there can't be any line after that anyway.
            b_end += 1
        if hunk.b_start <= line < b_end:
            return hunk
    return None