function resolve( dtypes, policy ) {
	var dt;
	var p;

	// First, check whether the policy mandates that the output data type always be a specific data type...
	if ( isDataType( policy ) ) {
		return policy;
	}
	// Next, check whether the policy is one in which we may be able to avoid type promotion...
	p = POLICY_TABLE1[ policy ];
	if ( p !== void 0 ) {
		return p( dtypes );
	}
	// For all other policies, we always apply type promotion rules...
	dt = promotedPolicy( dtypes );

	// Check whether the policy requires determining the data type "kind"...
	p = POLICY_TABLE2[ policy ];
	if ( p !== void 0 ) {
		// Check whether the promoted data type belongs to the data type "kind"...
		if ( p[ 0 ]( dt ) ) {
			// If so, we can just return the promoted data type:
			return dt;
		}
		// Otherwise, we need to fallback to a default data type belonging to that "kind":
		return p[ 1 ];
	}
	throw new TypeError( format( 'invalid argument. Second argument must be a supported data type policy. Value: `%s`.', policy ) );
}
Resolves the output data type from a list of input ndarray data types.

@param {StringArray} dtypes - list of input ndarray data types
@param {string} policy - output ndarray data type policy
@throws {TypeError} second argument must be a recognized data type policy
@throws {Error} unexpected error
@returns {string} output ndarray data type

@example
var dt = resolve( [ 'float64' ], 'complex_floating_point' );
// returns <string>