class_docstr: A classification category.
  
  Category is a util class, contains a label, its display name, a float
  value as score, and the index of the label in the corresponding label file.
  Typically it's used as the result of classification tasks.
  
  Attributes:
    index: The index of the label in the corresponding label file.
    score: The probability score of this label category.
    display_name: The display name of the label, which may be translated for
      different locales. For example, a label, "apple", may be translated into
      Spanish for display purpose, so that the `display_name` is "manzana".
    category_name: The label of this category object.
docstr: Creates a `Category` object from the given protobuf object.
docstr_tok: ["Creates","a","`","Category","`","object","from","the","given","protobuf","object","."]
code: def create_from_pb2(cls, pb2_obj: _ClassificationProto) -> "Category":
      """Creates a `Category` object from the given protobuf object."""
      return Category(
          index=pb2_obj.index,
          score=pb2_obj.score,
          display_name=pb2_obj.display_name,
          category_name=pb2_obj.label,
      )
  
file_path: mediapipe/mediapipe/tasks/python/components/containers/category.py
imports: import dataclasses
  from typing import Any, Optional
  from mediapipe.framework.formats import classification_pb2
  from mediapipe.tasks.python.core.optional_dependencies import doc_controls
label_desc: Use image node_id 2 for calling the Category obj's underlying member method code with example usage: obj.create_from_pb2(cls, pb2_obj) and returns: Category