in spotify_tensorflow/tf_schema_utils.py [0:0]
def parse_schema_txt_file(schema_path): # type: (str) -> Schema
"""
Parse a tf.metadata Schema txt file into its in-memory representation.
"""
assert file_io.file_exists(schema_path), "File not found: {}".format(schema_path)
schema = Schema()
schema_text = file_io.read_file_to_string(schema_path)
google.protobuf.text_format.Parse(schema_text, schema)
return schema