code: def write_schema_text(
      schema: schema_pb2.Schema, output_path: Text
  ) -> None:
      """Writes input schema to a file in text format.
  
      Args:
        schema: A Schema protocol buffer.
        output_path: File path to write the input schema.
  
      Raises:
        TypeError: If the input schema is not of the expected type.
      """
      if not isinstance(schema, schema_pb2.Schema):
          raise TypeError(
              "schema is of type %s, should be a Schema proto."
              % type(schema).__name__
          )
  
      schema_text = text_format.MessageToString(schema)
      io_util.write_string_to_file(output_path, schema_text)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import logging
  from typing import Any, Iterable, List, Mapping, Optional, Set, Text, Tuple, Union
  from tensorflow_data_validation import types
  from tensorflow_data_validation.utils import io_util
  from google.protobuf import descriptor
  from google.protobuf import text_format
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 4 for calling a global function with example usage: write_schema_text(schema, output_path) without return types