class_docstr: Market data dictionary representation.
docstr: Returns past fixings of the market rates at the specified dates.
  
  The fixings are represented asannualized simple rates. When fixings are not
  provided for a curve, they are assumed to be zero for any date. Otherwise,
  it is assumed that the fixings are a left-continuous piecewise-constant
  of time with jumps being the supplied fixings.
  
  Args:
    date: The dates at which the fixings are computed. Should precede the
      valuation date. When passed as an integet `Tensor`, should be of shape
      `batch_shape + [3]` and contain `[year, month, day]` for each date.
    fixing_type: Rate index curve type for which the fixings are computed.
  
  Returns:
    A `Tensor` of the same shape of `date` and of `self.dtype` dtype.
    Represents fixings at the requested `date`.
docstr_tok: ["Returns","past","fixings","of","the","market","rates","at","the","specified","dates",".","The","fixings","are","represented","asannualized","simple","rates",".","When","fixings","are","not","provided","for","a","curve",",","they","are","assumed","to","be","zero","for","any","date",".","Otherwise",",","it","is","assumed","that","the","fixings","are","a","left-continuous","piecewise-constant","of","time","with","jumps","being","the","supplied","fixings",".","Args",":","date",":","The","dates","at","which","the","fixings","are","computed",".","Should","precede","the","valuation","date",".","When","passed","as","an","integet","`","Tensor","`",",","should","be","of","shape","`","batch_shape","+","[","3","]","`","and","contain","`","[","year",",","month",",","day","]","`","for","each","date",".","fixing_type",":","Rate","index","curve","type","for","which","the","fixings","are","computed",".","Returns",":","A","`","Tensor","`","of","the","same","shape","of","`","date","`","and","of","`","self.dtype","`","dtype",".","Represents","fixings","at","the","requested","`","date","`","."]
code: def fixings(
      self,
      date: types.DateTensor,
      fixing_type: curve_types.RateIndexCurve,
  ) -> Tuple[tf.Tensor, daycount_conventions.DayCountConventions]:
      """Returns past fixings of the market rates at the specified dates.
  
      The fixings are represented asannualized simple rates. When fixings are not
      provided for a curve, they are assumed to be zero for any date. Otherwise,
      it is assumed that the fixings are a left-continuous piecewise-constant
      of time with jumps being the supplied fixings.
  
      Args:
        date: The dates at which the fixings are computed. Should precede the
          valuation date. When passed as an integet `Tensor`, should be of shape
          `batch_shape + [3]` and contain `[year, month, day]` for each date.
        fixing_type: Rate index curve type for which the fixings are computed.
  
      Returns:
        A `Tensor` of the same shape of `date` and of `self.dtype` dtype.
        Represents fixings at the requested `date`.
      """
      index_type = fixing_type.index.type.value
      currency = fixing_type.currency.value
      if isinstance(date, tf.Tensor):
          # When the input is a Tensor, `dateslib.convert_to_date_tensor` assumes
          # that the ordinals are passed. Instead we assume that the inputs
          # are of shape `batch_shape + [3]` and are interpreted as pairs
          # [year, month, day]
          date = dateslib.dates_from_tensor(date)
      else:
          date = dateslib.convert_to_date_tensor(date)
      try:
          curve_data = self._market_data_dict["rates"][currency][
              index_type
          ]
          fixing_dates = curve_data["fixing_dates"]
          fixing_rates = curve_data["fixing_rates"]
      except KeyError:
          return (
              tf.zeros(
                  tf.shape(date.ordinal()),
                  dtype=self._dtype,
                  name="fixings",
              ),
              None,
          )
      if isinstance(fixing_dates, tf.Tensor):
          fixing_dates = dateslib.dates_from_tensor(fixing_dates)
      else:
          fixing_dates = dateslib.convert_to_date_tensor(fixing_dates)
      if "fixing_daycount" not in curve_data:
          raise ValueError(
              f"`fixing_daycount` should be specified for {index_type}."
          )
      fixing_daycount = curve_data["fixing_daycount"]
      fixing_daycount = daycount_conventions.DayCountConventions(
          fixing_daycount
      )
      fixing_rates = tf.convert_to_tensor(
          fixing_rates, dtype=self._dtype
      )
      fixing_dates_ordinal = fixing_dates.ordinal()
      date_ordinal = date.ordinal()
      # Broadcast fixing dates for tf.searchsorted
      batch_shape = tf.shape(date_ordinal)[:-1]
      # Broadcast valuation date batch shape for tf.searchsorted
      fixing_dates_ordinal += tf.expand_dims(
          tf.zeros(batch_shape, dtype=tf.int32), axis=-1
      )
      inds = tf.searchsorted(fixing_dates_ordinal, date_ordinal)
      inds = tf.maximum(inds, 0)
      inds = tf.minimum(inds, tf.shape(fixing_dates_ordinal)[-1] - 1)
      return tf.gather(fixing_rates, inds), fixing_daycount
  
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 5 for calling the MarketDataDict obj's underlying member method code with example usage: obj.fixings(date, fixing_type) and returns: tf,  fixing_daycount, tf,  None