code: def _construct_vol_data_const_vol(
      volatility, total_covariance_fn, dim, dtype
  ):
      """Constructs vol data when constant volatility is supplied."""
      volatility_matrix = _ensure_matrix(volatility, dim, dtype)
  
      def vol_fn(time):
          return outer_multiply(tf.ones_like(time), volatility_matrix)
  
      if total_covariance_fn is not None:
          return vol_fn, total_covariance_fn
  
      # Need to compute total covariance.
      covariance_matrix = _covar_from_vol(volatility, dim, dtype)
      covar_fn = lambda t1, t2: outer_multiply(
          t2 - t1, covariance_matrix
      )
      return vol_fn, covar_fn
  
file_path: tf-quant-finance/tf_quant_finance/models/legacy/brownian_motion_utils.py
imports: import tensorflow.compat.v2
  from tf_quant_finance.math import gradient
label_desc: Use image node_id 11 for calling a global function with example usage: _construct_vol_data_const_vol(volatility, total_covariance_fn, dim, dtype) and returns: vol_fn,  covar_fn, outer_multiply, vol_fn,  total_covariance_fn