def get_orfs_in_range(all_orfs, rang):
    """
    Given a list of orfs, return only those contained within a range.
    """
    orfs_in_range = []
    for orf in all_orfs:
        lower = min(orf[0][0], orf[0][1])
        upper = max(orf[0][0], orf[0][1])

        if lower >= rang[0] and upper <= rang[1]:
            orfs_in_range.append(orf)

    return orfs_in_range