class_docstr: Market data dictionary representation.
docstr: The yield curve object.
docstr_tok: ["The","yield","curve","object","."]
code: def yield_curve(
      self, curve_type: curve_types.CurveType
  ) -> rate_curve.RateCurve:
      """The yield curve object."""
      # Extract the currency of the curve
      currency = curve_type.currency.value
      if currency not in self.supported_currencies:
          raise ValueError(
              f"Currency '{curve_type.currency}' is not supported"
          )
      try:
          if isinstance(curve_type, curve_types.RiskFreeCurve):
              curve_id = "risk_free_curve"
          else:
              curve_id = curve_type.index.type.name
          curve_data = self._market_data_dict["rates"][currency][
              curve_id
          ]
      except KeyError:
          raise KeyError(
              "No data for {0} which corresponds to curve {1}".format(
                  curve_id, curve_type
              )
          )
      rate_config = self._market_data_dict["rates"][currency][
          curve_id
      ].get("config", None)
      dates = curve_data["dates"]
      discount_factors = curve_data["discounts"]
      if rate_config is None:
          return rate_curve.RateCurve(
              dates,
              discount_factors,
              self._valuation_date,
              curve_type=curve_type,
              dtype=self._dtype,
          )
      else:
          return rate_curve.RateCurve(
              dates,
              discount_factors,
              self._valuation_date,
              curve_type=curve_type,
              interpolator=rate_config.get(
                  "interpolation_method", None
              ),
              interpolate_rates=rate_config.get(
                  "interpolate_rates", True
              ),
              daycount_convention=rate_config.get(
                  "daycount_convention", None
              ),
              dtype=self._dtype,
          )
  
imports: import datetime
  from typing import Dict, Any, List, Optional, Tuple
  import tensorflow.compat.v2
  from tf_quant_finance import datetime
  from tf_quant_finance import math
  from tf_quant_finance.experimental.pricing_platform.framework.core import currencies
  from tf_quant_finance.experimental.pricing_platform.framework.core import curve_types
  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.framework.market_data import rate_curve
  from tf_quant_finance.experimental.pricing_platform.framework.market_data import volatility_surface
label_desc: Use image node_id 4 for calling the MarketDataDict obj's underlying member method code with example usage: obj.yield_curve(curve_type) and returns: rate_curve, rate_curve