code: def gen_go_schemas_package(schemas: List[Schema]) -> List[str]:
      """
      Generate a file at the level of pkg/schemas/ that has all of the schemas embedded into it for
      all config types.
  
      This is necesary to have a single place that can create validators with all of the schema
      urls, so that schemas of one type are free to reference schemas of another type.
      """
      lines = []
      lines.append("// Code generated by gen.py. DO NOT EDIT.")
      lines.append("")
      lines.append("package schemas")
      lines.append("")
      lines.append("import (")
      lines.append('\t"encoding/json"')
      lines.append('\t"sync"')
      lines.append(")")
      lines.append("")
  
      # Global variables (lazily loaded but otherwise constants).
      lines.append("var (")
      # Schema texts.
      lines.extend(
          [
              f"\ttext{schema.golang_title} = []byte(`{schema.text}`)"
              for schema in schemas
          ]
      )
      # Cached schema values, initially nil.
      for schema in schemas:
          lines.append(f"\tschema{schema.golang_title} interface{{}}")
          lines.append("")
      # Cached map of urls to schema values, initially nil.
      lines.append("\tcacheLock sync.RWMutex")
      lines.append("")
      lines.append("\tcachedSchemaMap map[string]interface{}")
      lines.append("")
      lines.append("\tcachedSchemaBytesMap map[string][]byte")
      lines.append(")")
      lines.append("")
  
      # Schema getters.  These are exported so that they can be used in the individual packages.
      for schema in schemas:
          lines.extend(
              [
                  f"func Parsed{schema.golang_title}() interface{{}} {{",
                  "\tcacheLock.RLock()",
                  f"\tif schema{schema.golang_title} != nil {{",
                  "\t\tcacheLock.RUnlock()",
                  f"\t\treturn schema{schema.golang_title}",
                  "\t}",
                  "\tcacheLock.RUnlock()",
                  "",
                  "\tcacheLock.Lock()",
                  "\tdefer cacheLock.Unlock()",
                  f"\tif schema{schema.golang_title} != nil {{",
                  f"\t\treturn schema{schema.golang_title}",
                  "\t}",
                  f"\terr := json.Unmarshal(text{schema.golang_title}, &schema{schema.golang_title})",
                  "\tif err != nil {",
                  f'\t\tpanic("invalid embedded json for {schema.golang_title}")',
                  "\t}",
                  f"\treturn schema{schema.golang_title}",
                  "}",
              ]
          )
          lines.append("")
  
      # SchemaBytesMap, used internally by NewCompiler, which has to have a list of all schemas.
      lines.append("func schemaBytesMap() map[string][]byte {")
      lines.append("\tcacheLock.RLock()")
      lines.append("\tif cachedSchemaBytesMap != nil {")
      lines.append("\t\tcacheLock.RUnlock()")
      lines.append("\t\treturn cachedSchemaBytesMap")
      lines.append("\t}")
      lines.append("\tcacheLock.RUnlock()")
      lines.append("")
      lines.append("\tcacheLock.Lock()")
      lines.append("\tdefer cacheLock.Unlock()")
      lines.append("\tif cachedSchemaBytesMap != nil {")
      lines.append("\t\treturn cachedSchemaBytesMap")
      lines.append("\t}")
      lines.append("\tvar url string")
      lines.append("\tcachedSchemaBytesMap = map[string][]byte{}")
      for schema in schemas:
          lines.append(f'\turl = "{schema.url}"')
          lines.append(
              f"\tcachedSchemaBytesMap[url] = text{schema.golang_title}"
          )
      lines.append("\treturn cachedSchemaBytesMap")
      lines.append("}")
  
      return lines
  
imports: import argparse
  import json
  import os
  import re
  import sys
  from typing import List, Optional, Tuple
label_desc: Use image node_id 4 for calling a global function with example usage: gen_go_schemas_package(schemas) and returns: lines