code: def error_schema(context: Optional[str] = None):
      """Wrap functions that check schemas in this context manager to throw an
      appropriate error with a nice message.
  
      """
      prefix = ""
      if context is not None:
          prefix = f"\nValidation error while parsing {context}:\n"
  
      try:
          yield
      except s.SchemaError as e:
          raise FatalSchemaError(e.code, prefix)
  
file_path: caliban/caliban/util/schema.py
imports: import os
  import sys
  from contextlib import contextmanager
  from typing import Optional
  import commentjson
  import caliban.util
  import schema
label_desc: Use image node_id 1 for calling a global function with example usage: error_schema(context) without return types