class_docstr: Rate index object.
code: def __post_init__(self):
      if isinstance(self.type, str):
          try:
              self.type = getattr(RateIndexType, self.type)
          except KeyError:
              raise ValueError(
                  f"{self.type} is not a valid rate index type."
              )
  
file_path: tf-quant-finance/tf_quant_finance/experimental/pricing_platform/framework/core/rate_indices.py
imports: import enum
  from typing import Optional, Union
  import dataclasses
  import tensorflow.compat.v2
  from tf_quant_finance.experimental.pricing_platform.instrument_protos import rate_indices_pb2
label_desc: Use image node_id 1 for calling the RateIndex obj's underlying member method code with example usage: obj.__post_init__() without return types