code: def _make_drift_fn_from_const(drift_const, dim, dtype):
      drift_const = tf.convert_to_tensor(drift_const, dtype=dtype)
      # This trivial multiplication ensures that drift_const is of shape at
      # least [dim].
      drift_const = (
          tf.ones([dim], dtype=drift_const.dtype) * drift_const
      )
      return lambda t: outer_multiply(tf.ones_like(t), drift_const)
  
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 5 for calling a global function with example usage: _make_drift_fn_from_const(drift_const, dim, dtype) and returns: function