code: def _convert_to_tensors(
      dtype,
      bond_cashflows,
      bond_cashflow_times,
      present_values,
      pv_settle_times,
  ):
      """Converts each element of the supplied lists to a tensor."""
  
      bond_cashflows = [
          tf.convert_to_tensor(
              cashflow, dtype=dtype, name="cashflows_bond_{}".format(i)
          )
          for i, cashflow in enumerate(bond_cashflows)
      ]
      bond_cashflow_times = [
          tf.convert_to_tensor(
              cashflow_times,
              dtype=dtype,
              name="cashflow_times_bond_{}".format(i),
          )
          for i, cashflow_times in enumerate(bond_cashflow_times)
      ]
      present_values = [
          tf.convert_to_tensor(
              pv, dtype=dtype, name="pv_bond_{}".format(i)
          )
          for i, pv in enumerate(present_values)
      ]
      pv_settle_times = [
          tf.convert_to_tensor(
              pv_time,
              dtype=dtype,
              name="pv_settle_time_bond_{}".format(i),
          )
          for i, pv_time in enumerate(pv_settle_times)
      ]
  
      return (
          bond_cashflows,
          bond_cashflow_times,
          present_values,
          pv_settle_times,
      )
  
file_path: tf-quant-finance/tf_quant_finance/rates/hagan_west/bond_curve.py
imports: import tensorflow.compat.v2
  from tf_quant_finance import types
  from tf_quant_finance import utils
  from tf_quant_finance.rates.analytics import cashflows
  from tf_quant_finance.rates.hagan_west import monotone_convex
label_desc: Use image node_id 6 for calling a global function with example usage: _convert_to_tensors(dtype, bond_cashflows, bond_cashflow_times, present_values, pv_settle_times) and returns: bond_cashflows,  bond_cashflow_times,  present_values,  pv_settle_times