class_docstr: Rate index object.
docstr: Creates RateIndexType from a proto field value.
docstr_tok: ["Creates","RateIndexType","from","a","proto","field","value","."]
code: def from_proto(cls, proto: rate_indices_pb2.RateIndex) -> "RateIndex":
      """Creates RateIndexType from a proto field value."""
      return cls(
          name=rate_indices_pb2.RateIndexName.Name(proto.name),
          type=rate_indices_pb2.RateIndexType.Name(proto.type),
          source=proto.source,
      )
  
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 2 for calling the RateIndex obj's underlying member method code with example usage: obj.from_proto(cls, proto) and returns: cls