class_docstr: Schema reader.
class_docstr_tok: ["Schema","reader","."]
docstr: Gets a tf.metadata schema.
  
  Args:
    schema_path: Path to schema file.
  
  Returns:
    A tf.metadata schema.
docstr_tok: ["Gets","a","tf.metadata","schema",".","Args",":","schema_path",":","Path","to","schema","file",".","Returns",":","A","tf.metadata","schema","."]
code: def read(
      self, schema_path: str
  ) -> schema_pb2_Schema:  # pytype: disable=invalid-annotation
      """Gets a tf.metadata schema.
  
      Args:
        schema_path: Path to schema file.
  
      Returns:
        A tf.metadata schema.
      """
      try:
          from tensorflow_metadata.proto.v0 import (
              schema_pb2,
          )  # pylint: disable=g-import-not-at-top
      except ModuleNotFoundError as e:
          raise Exception(
              'The full "tfx" package must be installed to use this '
              "functionality."
          ) from e
  
      result = schema_pb2.Schema()
      contents = fileio.open(schema_path).read()
      text_format.Parse(contents, result)
      return result
  
imports: import os
  import re
  import tempfile
  from typing import List, TypeVar, Iterable
  from tfx.dsl.io import fileio
  from google.protobuf import json_format
  from google.protobuf import text_format
  from google.protobuf.message import Message
label_desc: Use image node_id 1 for calling the SchemaReader obj's underlying member method code with example usage: obj.read(schema_path) and returns: result