class_docstr: Embedding result for a given embedder head.
  
  Attributes:
    embedding: The actual embedding, either floating-point or scalar-quantized.
    head_index: The index of the embedder head that produced this embedding.
      This is useful for multi-head models.
    head_name: The name of the embedder head, which is the corresponding tensor
      metadata name (if any). This is useful for multi-head models.
docstr: Creates a `Embedding` object from the given protobuf object.
code: def create_from_pb2(cls, pb2_obj: _EmbeddingProto) -> "Embedding":
      """Creates a `Embedding` object from the given protobuf object."""
  
      quantized_embedding = np.array(
          bytearray(pb2_obj.quantized_embedding.values)
      )
      float_embedding = np.array(
          pb2_obj.float_embedding.values, dtype=float
      )
  
      if not pb2_obj.quantized_embedding.values:
          return Embedding(
              embedding=float_embedding,
              head_index=pb2_obj.head_index,
              head_name=pb2_obj.head_name,
          )
      else:
          return Embedding(
              embedding=quantized_embedding,
              head_index=pb2_obj.head_index,
              head_name=pb2_obj.head_name,
          )
  
file_path: mediapipe/mediapipe/tasks/python/components/containers/embedding_result.py
imports: import dataclasses
  from typing import Optional, List
  import numpy
  from mediapipe.tasks.cc.components.containers.proto import embeddings_pb2
  from mediapipe.tasks.python.core.optional_dependencies import doc_controls
label_desc: Use image node_id 1 for calling the Embedding obj's underlying member method code with example usage: obj.create_from_pb2(cls, pb2_obj) and returns: Embedding, Embedding