code: def get_yield_and_time(
      discount_curve: pmd.RateCurve,
      valuation_date: types.DateTensor,
      dtype,
  ) -> Tuple[types.FloatTensor, types.FloatTensor]:
      """Extracts yileds and the corresponding times from a RateCurve."""
      discount_nodes = discount_curve.discount_factor_nodes
      node_dates = discount_curve.node_dates
      daycount_fn = discount_curve.daycount_fn()
      times = daycount_fn(
          start_date=valuation_date, end_date=node_dates, dtype=dtype
      )
      yields = (1 / discount_nodes) ** (1 / times) - 1
      return yields, times
  
file_path: tf-quant-finance/tf_quant_finance/experimental/pricing_platform/framework/market_data/utils.py
imports: import functools
  from typing import Callable, Dict, Tuple, List, Union
  from tf_quant_finance import datetime
  from tf_quant_finance.experimental.pricing_platform.framework.core import business_days
  from tf_quant_finance.experimental.pricing_platform.framework.core import daycount_conventions
  from tf_quant_finance.experimental.pricing_platform.framework.core import processed_market_data
  from tf_quant_finance.experimental.pricing_platform.framework.core import types
  from tf_quant_finance.experimental.pricing_platform.instrument_protos import period_pb2
label_desc: Use image node_id 6 for calling a global function with example usage: get_yield_and_time(discount_curve, valuation_date, dtype) and returns: yields,  times