protected function is_needed( $dependency, $context ) {
		$is_needed = array_key_exists( 'is_needed', $dependency )
			? $dependency['is_needed']
			: null;

		if ( null === $is_needed ) {
			return true;
		}

		return is_callable( $is_needed ) && $is_needed( $context );
	}