protected function prepare_args( array $args, array $required ) {

		// Check for required arguments.
		$required = \wp_parse_args( $required, [ 'tab_id' ] );

		foreach ( $required as $property ) {
			if ( ! isset( $args[ $property ] ) ) {
				throw new \InvalidArgumentException( "Missing argument '$property'." );
			}
		}

		// Add default arguments.
		$defaults = [
			'section'           => $args['tab_id'],
			'short'             => null,
			'label'             => null,
			'help_text'         => null,
			'inline_help'       => false,
			'attributes'        => [],
			'outer_attributes'  => [],
			'settings_args'     => [],
			'sanitize_callback' => null,
		];
		$args     = \wp_parse_args( $args, $defaults );

		return $args;
	}