class_docstr: Simple container holding classification labels of a particular tensor.
  
  Example usage:
    # The first added label list can be used as category names as needed.
    labels = Labels()
      .add(['/m/011l78', '/m/031d23'])
      .add(['cat', 'dog], 'en')
      .add(['chat', 'chien], 'fr')
class_docstr_tok: ["Simple","container","holding","classification","labels","of","a","particular","tensor",".","Example","usage",":","#","The","first","added","label","list","can","be","used","as","category","names","as","needed",".","labels","=","Labels","(",")",".add","(","[","'\/m\/011l78","'",",","'\/m\/031d23","'","]",")",".add","(","[","'cat","'",",","'dog","]",",","'en","'",")",".add","(","[","'chat","'",",","'chien","]",",","'fr","'",")"]
docstr: Adds a label file in the container.
  
  Args:
    label_filepath: File path to read labels. Each line is a label name in the
      file.
    locale: The specified locale for labels.
    exported_filename: The file name to export the labels. If not set,
      filename defaults to 'labels.txt'.
  
  Returns:
    The Labels instance, can be used for chained operation.
code: def add_from_file(
      self,
      label_filepath: str,
      locale: Optional[str] = None,
      exported_filename: Optional[str] = None,
  ) -> "Labels":
      """Adds a label file in the container.
  
      Args:
        label_filepath: File path to read labels. Each line is a label name in the
          file.
        locale: The specified locale for labels.
        exported_filename: The file name to export the labels. If not set,
          filename defaults to 'labels.txt'.
  
      Returns:
        The Labels instance, can be used for chained operation.
      """
  
      with open(label_filepath, "r") as f:
          labels = f.read().split("\n")
          return self.add(labels, locale, exported_filename)
  
imports: import collections
  import csv
  import dataclasses
  import os
  import tempfile
  from typing import List, Optional, Tuple, Union
  import flatbuffers
  from mediapipe.tasks.metadata import metadata_schema_py_generated
  from mediapipe.tasks.python.metadata import metadata
  from mediapipe.tasks.python.metadata.metadata_writers import metadata_info
  from mediapipe.tasks.python.metadata.metadata_writers import writer_utils
label_desc: Use image node_id 4 for calling the Labels obj's underlying member method code with example usage: obj.add_from_file(label_filepath, locale, exported_filename) and returns: self