code: def _make_hjm_volatility_fn(volatility, dtype):
      volatility = tf.convert_to_tensor(volatility, dtype=dtype)
  
      return volatility
  
file_path: tf-quant-finance/tf_quant_finance/models/hjm/calibration.py
imports: from typing import Callable, Tuple
  import numpy
  import tensorflow.compat.v2
  import tensorflow_probability
  from tf_quant_finance import types
  from tf_quant_finance import utils
  from tf_quant_finance.black_scholes import implied_vol
  from tf_quant_finance.black_scholes.implied_vol_utils import UnderlyingDistribution
  from tf_quant_finance.math import make_val_and_grad_fn
  from tf_quant_finance.math import optimizer
  from tf_quant_finance.math import random
  from tf_quant_finance.models import valuation_method
  from tf_quant_finance.models.hjm.swaption_pricing import price
  from tf_quant_finance.rates.analytics import swap
label_desc: Use image node_id 3 for calling a global function with example usage: _make_hjm_volatility_fn(volatility, dtype) and returns: volatility