`get_terms()` with `child_of` and `childless` combined

OK, so this is what I came up with:

function get_childless_term_children( $parent_id, $taxonomy ) {
  // get all childless $terms of this $taxonomy
  $terms = get_terms(array(
    'taxonomy' => $taxonomy,
    'childless' => true,
  ));

  foreach( $terms as $key => $term ) {
    // remove $terms that aren't descendants (= children) of $parent_id
    if( !in_array( $parent_id, get_ancestors( $term->term_id, $taxonomy ) ) ) {
      unset( $terms[$key] );
    }
  }
  return $terms;
}

What this does: Get all childless terms that are children of $parent_id.